The patches for 3.0.9.
[rsync.git/patches.git] / source-backup.diff
index 2ee5cae16520a5fbf45ac545f4643369751c84e0..a0b99dddf69a977a21fca5fcb9d1239c42318edf 100644 (file)
@@ -9,6 +9,7 @@ To use this patch, run these commands for a successful build:
 
 -- Matt McCutchen <hashproduct@gmail.com>
 
+based-on: 40afd365cc8ca968fd16e161d24df5b8a8a520cc
 diff --git a/options.c b/options.c
 --- a/options.c
 +++ b/options.c
@@ -20,7 +21,7 @@ diff --git a/options.c b/options.c
  
  /**
   * If 1, send the whole file as literal data rather than trying to
-@@ -368,6 +369,7 @@ void usage(enum logcode F)
+@@ -366,6 +367,7 @@ void usage(enum logcode F)
    rprintf(F,"     --existing              skip creating new files on receiver\n");
    rprintf(F,"     --ignore-existing       skip updating files that already exist on receiver\n");
    rprintf(F,"     --remove-source-files   sender removes synchronized files (non-dirs)\n");
@@ -28,7 +29,7 @@ diff --git a/options.c b/options.c
    rprintf(F,"     --del                   an alias for --delete-during\n");
    rprintf(F,"     --delete                delete extraneous files from destination dirs\n");
    rprintf(F,"     --delete-before         receiver deletes before transfer, not during\n");
-@@ -608,6 +610,7 @@ static struct poptOption long_options[] = {
+@@ -606,6 +608,7 @@ static struct poptOption long_options[] = {
    {"bwlimit",          0,  POPT_ARG_INT,    &bwlimit, 0, 0, 0 },
    {"no-bwlimit",       0,  POPT_ARG_VAL,    &bwlimit, 0, 0, 0 },
    {"backup",          'b', POPT_ARG_VAL,    &make_backups, 1, 0, 0 },
@@ -36,7 +37,7 @@ diff --git a/options.c b/options.c
    {"no-backup",        0,  POPT_ARG_VAL,    &make_backups, 0, 0, 0 },
    {"backup-dir",       0,  POPT_ARG_STRING, &backup_dir, 0, 0, 0 },
    {"suffix",           0,  POPT_ARG_STRING, &backup_suffix, 0, 0, 0 },
-@@ -1973,6 +1976,8 @@ void server_options(char **args, int *argc_p)
+@@ -1978,6 +1981,8 @@ void server_options(char **args, int *argc_p)
                                goto oom;
                        args[ac++] = arg;
                }
@@ -48,17 +49,17 @@ diff --git a/options.c b/options.c
 diff --git a/rsync.yo b/rsync.yo
 --- a/rsync.yo
 +++ b/rsync.yo
-@@ -365,6 +365,7 @@ to the detailed description below for a complete description.  verb(
+@@ -378,6 +378,7 @@ to the detailed description below for a complete description.  verb(
       --existing              skip creating new files on receiver
       --ignore-existing       skip updating files that exist on receiver
       --remove-source-files   sender removes synchronized files (non-dir)
 +     --source-backup         ... and backs up those files
       --del                   an alias for --delete-during
       --delete                delete extraneous files from dest dirs
-      --delete-before         receiver deletes before transfer (default)
-@@ -1118,6 +1119,14 @@ dit(bf(--remove-source-files)) This tells rsync to remove from the sending
- side the files (meaning non-directories) that are a part of the transfer
and have been successfully duplicated on the receiving side.
+      --delete-before         receiver deletes before xfer, not during
+@@ -1203,6 +1204,14 @@ transferring files that are not yet finished (e.g. name the file "foo.new" when
+ it is written, rename it to "foo" when it is done, and then use the option
bf(--exclude='*.new') for the rsync transfer).
  
 +dit(bf(--source-backup)) Makes the sender back up the source files it removes
 +due to bf(--remove-source-files).  This option is independent of