[PATCH] Batch-mode rewrite

Wayne Davison wayned at samba.org
Thu Jul 15 03:07:36 GMT 2004


I did some work refining your patch a little, and liked the result so
much I went ahead and checked it into CVS.  I'd appreciate it if you
could give my changes a look to see if I messed anything up. 

The most important changes I made were:

 - Delay the start of batch writing until after any exclude-list and
   files-from data gets sent.

 - Reinstated the final report() so that the end-of-transfer summary
   shows up when reading a batch.  I had to make the report() code
   always write out the stats data into the batch file.  Added a big
   comment at the top to help explain what it is doing.
   
 - To make the first 2 items easier on the code, I changed the pipe
   code so that a local-to-local transfer turns off write-batch mode
   in the "am_server" process (this way the server never writes the
   batch, just the client).

 - Got rid of the --files-from option from the FOO.rsync_argvs.

 - Got rid of a host: prefix in the destination arg in FOO.rsync_argvs
   (this got checked in before the new-batch changes since it affected
   the old batch code too).

 - Added a check to the generator so that it doesn't do a lot of
   useless checksum-generating work when --read-batch is specified.

 - Added some text to the manpage that talks about what options change
   when switching from --write-batch to --read-batch and what options
   must remain the same.

 - Decided not to include your comments on potential protocol changes.

 - Removed some unused variables, and other misc. twiddles.

If you want to see the changes without resorting to CVS, you can look
here:

    http://www.blorf.net/newbatch.patch

Thanks for the nice patches!  I think this will make batch mode much
nicer.  We can consider marking it as less experimental in the man page
after some more testing.  (I've done just a little so far.)

..wayne..


More information about the rsync mailing list