On Fri, Jul 20, 2012 at 09:27:04AM -0500, Domsch, Matt wrote:
> On Fri, Jul 20, 2012 at 07:06:33AM -0500, John Sauter wrote:
> > Matt,
> > 
> > When I first attempted to use your merged s3cmd, I found that specifying
> > 
> >     --exclude='*' --include='*.gpg'
> > 
> > gave a different result.  Previously, it would include all the gpg files
> > in the tree; now it includes only the gpg files at the top level.  You
> > noted that you were now applying excludes/includes at local os.walk()
> > time--I wonder if this might be the cause of the changed behavior.
> > 
> > I have reverted to the previous s3cmd, but I will install your new one
> > and re-test if you need more details or have a workaround.
> 
> You are correct, the way excludes/includes are processed now this
> won't work because the * matches all directories during the walk.
> You'll have to somehow explicitly include the directories that lead to
> each of the *.gpg files.  I need to think about this some more for an
> example.

I have found that by using:
  --exclude='*' --include='small/' --include='*.gpg'

I can cause the files in small/somefile.gpg to be included even though
the rest of the directories alongside small/ are excluded.  How deep
is your directory tree?  Could you put these patterns in a file and
pull them in with --include-from and --exclude-from ?

The problem I was solving was avoiding the need to recurse through a
ton of subdirectories (e.g. netapp .snapshot*) that were meaningless
to my sync, yet the os.walk() would be forced to decend through them.
The time for my sync was greatly reduced by implementing excludes at
os.walk() time.  The cost of such capability is needing to be more
explicit about what's excluded and included knowing it applies first
during os.walk(), not only afterwards to the set discovered by
os.walk().

> 
> There's also a fairly large failure introduced by the merge such that
> sync_local2remote looks awful, unnecessarily duplicated code and
> errors with undefined references.  I'll try to fix that up too.

Fixed these in my merge tree.  Also pulled in the newer pull request
by Christopher Noyes to include the encoding type in the content-type string.

> > By the way, it would be easier to discuss your new s3cmd if it had a
> > different version number than the s3cmd it is derived from.

Done. 

-version = "1.1.0-beta3"
+version = "1.1.0-beta3-mdomsch-merge-20120730"


Still hoping Michal Ludvig will pull all these changes into his tree.

Happy to take feedback on functionality of my 'merge' branch.

Thanks,
Matt

-- 
Matt Domsch
Technology Strategist
Dell | Office of the CTO

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
S3tools-general mailing list
S3tools-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/s3tools-general

Reply via email to