aws/aws-cli — pull request #531 by jamesls (2013-12-05 01:14:59+00:00)
Title: Fix bug when filtering s3 locations

The pattern is evaluated against the entire bucket. This doesn't
mattern for suffix searches, but for a prefix search, you'd have to
include the bucket name. This is inconsistent with filtering local
files. Now they're both consistent. Given:

```
--exclude 'foo*'
```

This will filter any full path that startsw with foo. So locally:

```
rootdir/
foo.txt # yes
foo1.txt # yes
foo/bar.txt # yes
bar.txt # no
```

And on s3, we now have the same results:

```
bucket/
foo.txt # yes
foo1.txt # yes
foo/bar.txt # yes
bar.txt # no
```

I also added debug logs to help customers troubleshoot why their
filters aren't working the way they expect. For example:

```
s3.filters - DEBUG - /private/tmp/syncme/level-1/file-7 matched exclude filter: /private/tmp/syncme/*
s3.filters - DEBUG - /private/tmp/syncme/level-1/file-7 did not match include filter: /private/tmp/syncme/f*
s3.filters - DEBUG - /private/tmp/syncme/level-1/file-7 matched include filter: /private/tmp/syncme/level*
s3.filters - DEBUG - =/private/tmp/syncme/level-1/file-7 final filtered status, should_include: True
```