Should --write-batch always sync the target tree?

Jos Backus josb at cncdsl.com
Sat Dec 8 05:44:22 EST 2001


Currently the --write-batch option in addition to creating the batch files
also syncs the target tree. I'm not sure whether this is always desired.  So
far the only way I have been able to come up with to prevent the target tree
from being populated is the patch below; however, the top-level target
directory is still created, so it is not complete. Does this sound like a
worthwile addition to optionally speed up --write-batch? We could add a flag
for this.

Comments?

Also, I'd like us to drop the -F and -f options so we can use these short
options for something used more often - I expect not too many people to use
the rsync+ features (but I could be wrong, of course).

--- receiver.c  7 May 2001 06:59:37 -0000       1.33
+++ receiver.c  7 Dec 2001 02:16:04 -0000
@@ -36,6 +36,7 @@
 extern char *compare_dest;
 extern int make_backups;
 extern char *backup_suffix;
+extern int write_batch;

 static struct delete_list {
        dev_t dev;
@@ -357,6 +358,12 @@
                        if (!am_server) {
                                log_transfer(file, fname);
                        }
+                       continue;
+               }
+
+               if (write_batch) {
+                       /* drain */
+                       receive_data(f_in,NULL,-1,NULL,file->length);
                        continue;
                }


-- 
Jos Backus                 _/  _/_/_/        Santa Clara, CA
                          _/  _/   _/
                         _/  _/_/_/             
                    _/  _/  _/    _/
josb at cncdsl.com     _/_/   _/_/_/            use Std::Disclaimer;




More information about the rsync mailing list