A slightly changed version of Matt's %C (checksum) logging patch.
[rsync/rsync-patches.git] / downdate.diff
index bbc89a2..29b5ec8 100644 (file)
@@ -9,7 +9,7 @@ To use this patch, run these commands for a successful build:
 
 --- old/generator.c
 +++ new/generator.c
-@@ -53,6 +53,7 @@ extern int ignore_errors;
+@@ -54,6 +54,7 @@ extern int ignore_errors;
  extern int remove_source_files;
  extern int delay_updates;
  extern int update_only;
@@ -17,7 +17,7 @@ To use this patch, run these commands for a successful build:
  extern int ignore_existing;
  extern int ignore_non_existing;
  extern int inplace;
-@@ -1144,6 +1145,13 @@ static void recv_generator(char *fname, 
+@@ -1437,6 +1438,13 @@ static void recv_generator(char *fname, 
                return;
        }
  
@@ -31,15 +31,22 @@ To use this patch, run these commands for a successful build:
        fnamecmp = fname;
        fnamecmp_type = FNAMECMP_FNAME;
  
-@@ -1452,7 +1460,7 @@ void generate_files(int f_out, struct fi
-       phase++;
-       csum_length = SUM_LENGTH;
-       max_size = min_size = ignore_existing = ignore_non_existing = 0;
--      update_only = always_checksum = size_only = 0;
-+      downdate_only = update_only = always_checksum = size_only = 0;
-       ignore_times = 1;
-       if (append_mode)  /* resend w/o append mode */
-               append_mode = -1; /* ... but only longer files */
+@@ -1780,6 +1788,7 @@ void generate_files(int f_out, char *loc
+               ignore_existing = -ignore_existing;
+               ignore_non_existing = -ignore_non_existing;
+               update_only = -update_only;
++              downdate_only = -downdate_only;
+               always_checksum = -always_checksum;
+               size_only = -size_only;
+               append_mode = -append_mode;
+@@ -1819,6 +1828,7 @@ void generate_files(int f_out, char *loc
+               ignore_existing = -ignore_existing;
+               ignore_non_existing = -ignore_non_existing;
+               update_only = -update_only;
++              downdate_only = -downdate_only;
+               always_checksum = -always_checksum;
+               size_only = -size_only;
+               append_mode = -append_mode;
 --- old/options.c
 +++ new/options.c
 @@ -56,6 +56,7 @@ int preserve_gid = 0;
@@ -50,7 +57,7 @@ To use this patch, run these commands for a successful build:
  int cvs_exclude = 0;
  int dry_run = 0;
  int do_xfers = 1;
-@@ -293,6 +294,7 @@ void usage(enum logcode F)
+@@ -289,6 +290,7 @@ void usage(enum logcode F)
    rprintf(F,"     --backup-dir=DIR        make backups into hierarchy based in DIR\n");
    rprintf(F,"     --suffix=SUFFIX         set backup suffix (default %s w/o --backup-dir)\n",BACKUP_SUFFIX);
    rprintf(F," -u, --update                skip files that are newer on the receiver\n");
@@ -58,7 +65,7 @@ To use this patch, run these commands for a successful build:
    rprintf(F,"     --inplace               update destination files in-place (SEE MAN PAGE)\n");
    rprintf(F,"     --append                append data onto shorter files\n");
    rprintf(F," -d, --dirs                  transfer directories without recursing\n");
-@@ -465,6 +467,7 @@ static struct poptOption long_options[] 
+@@ -462,6 +464,7 @@ static struct poptOption long_options[] 
    {"size-only",        0,  POPT_ARG_NONE,   &size_only, 0, 0, 0 },
    {"one-file-system", 'x', POPT_ARG_NONE,   0, 'x', 0, 0 },
    {"update",          'u', POPT_ARG_NONE,   &update_only, 0, 0, 0 },