The patches for 3.0.0pre10.
[rsync/rsync-patches.git] / backup-dir-dels.diff
index 7198018..679c7cc 100644 (file)
@@ -106,7 +106,7 @@ diff --git a/backup.c b/backup.c
 diff --git a/generator.c b/generator.c
 --- a/generator.c
 +++ b/generator.c
-@@ -95,6 +95,9 @@ extern uid_t our_uid;
+@@ -97,6 +97,9 @@ extern uid_t our_uid;
  extern char *backup_dir;
  extern char *backup_suffix;
  extern int backup_suffix_len;
@@ -116,7 +116,7 @@ diff --git a/generator.c b/generator.c
  extern struct file_list *cur_flist, *first_flist, *dir_flist;
  extern struct filter_list_struct server_filter_list;
  
-@@ -136,10 +139,15 @@ enum delret {
+@@ -138,10 +141,15 @@ enum delret {
  /* Forward declaration for delete_item(). */
  static enum delret delete_dir_contents(char *fname, int flags);
  
@@ -133,7 +133,7 @@ diff --git a/generator.c b/generator.c
  }
  
  /* Delete a file or directory.  If DEL_RECURSE is set in the flags, this will
-@@ -178,9 +186,9 @@ static enum delret delete_item(char *fbuf, int mode, int flags)
+@@ -180,9 +188,9 @@ static enum delret delete_item(char *fbuf, int mode, int flags)
        if (S_ISDIR(mode)) {
                what = "rmdir";
                ok = do_rmdir(fbuf) == 0;
@@ -173,7 +173,7 @@ diff --git a/options.c b/options.c
  char *sockopts = NULL;
  int rsync_port = 0;
  int compare_dest = 0;
-@@ -320,6 +326,8 @@ void usage(enum logcode F)
+@@ -324,6 +330,8 @@ void usage(enum logcode F)
    rprintf(F," -b, --backup                make backups (see --suffix & --backup-dir)\n");
    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);
@@ -182,7 +182,7 @@ diff --git a/options.c b/options.c
    rprintf(F," -u, --update                skip files that are newer on the receiver\n");
    rprintf(F,"     --inplace               update destination files in-place (SEE MAN PAGE)\n");
    rprintf(F,"     --append                append data onto shorter files\n");
-@@ -591,7 +599,9 @@ static struct poptOption long_options[] = {
+@@ -597,7 +605,9 @@ static struct poptOption long_options[] = {
    {"backup",          'b', POPT_ARG_VAL,    &make_backups, 1, 0, 0 },
    {"no-backup",        0,  POPT_ARG_VAL,    &make_backups, 0, 0, 0 },
    {"backup-dir",       0,  POPT_ARG_STRING, &backup_dir, 0, 0, 0 },
@@ -192,7 +192,7 @@ diff --git a/options.c b/options.c
    {"list-only",        0,  POPT_ARG_VAL,    &list_only, 2, 0, 0 },
    {"read-batch",       0,  POPT_ARG_STRING, &batch_name, OPT_READ_BATCH, 0, 0 },
    {"write-batch",      0,  POPT_ARG_STRING, &batch_name, OPT_WRITE_BATCH, 0, 0 },
-@@ -1405,6 +1415,8 @@ int parse_arguments(int *argc_p, const char ***argv_p, int frommain)
+@@ -1427,6 +1437,8 @@ int parse_arguments(int *argc_p, const char ***argv_p, int frommain)
                        tmpdir = sanitize_path(NULL, tmpdir, NULL, 0);
                if (backup_dir)
                        backup_dir = sanitize_path(NULL, backup_dir, NULL, 0);
@@ -201,7 +201,7 @@ diff --git a/options.c b/options.c
        }
        if (server_filter_list.head && !am_sender) {
                struct filter_list_struct *elp = &server_filter_list;
-@@ -1426,6 +1438,14 @@ int parse_arguments(int *argc_p, const char ***argv_p, int frommain)
+@@ -1448,6 +1460,14 @@ int parse_arguments(int *argc_p, const char ***argv_p, int frommain)
                        if (check_filter(elp, dir, 1) < 0)
                                goto options_rejected;
                }
@@ -216,7 +216,7 @@ diff --git a/options.c b/options.c
        }
  
        if (!backup_suffix)
-@@ -1437,6 +1457,15 @@ int parse_arguments(int *argc_p, const char ***argv_p, int frommain)
+@@ -1459,6 +1479,15 @@ int parse_arguments(int *argc_p, const char ***argv_p, int frommain)
                        backup_suffix);
                return 0;
        }
@@ -232,7 +232,7 @@ diff --git a/options.c b/options.c
        if (backup_dir) {
                backup_dir_len = strlcpy(backup_dir_buf, backup_dir, sizeof backup_dir_buf);
                backup_dir_remainder = sizeof backup_dir_buf - backup_dir_len;
-@@ -1460,6 +1489,30 @@ int parse_arguments(int *argc_p, const char ***argv_p, int frommain)
+@@ -1482,6 +1511,30 @@ int parse_arguments(int *argc_p, const char ***argv_p, int frommain)
                        "P *%s", backup_suffix);
                parse_rule(&filter_list, backup_dir_buf, 0, 0);
        }
@@ -263,7 +263,7 @@ diff --git a/options.c b/options.c
  
        if (make_backups && !backup_dir) {
                omit_dir_times = 0; /* Implied, so avoid -O to sender. */
-@@ -1853,6 +1906,10 @@ void server_options(char **args, int *argc_p)
+@@ -1875,6 +1928,10 @@ void server_options(char **args, int *argc_p)
                args[ac++] = "--backup-dir";
                args[ac++] = backup_dir;
        }
@@ -274,7 +274,7 @@ diff --git a/options.c b/options.c
  
        /* Only send --suffix if it specifies a non-default value. */
        if (strcmp(backup_suffix, backup_dir ? "" : BACKUP_SUFFIX) != 0) {
-@@ -1861,7 +1918,14 @@ void server_options(char **args, int *argc_p)
+@@ -1883,7 +1940,14 @@ void server_options(char **args, int *argc_p)
                        goto oom;
                args[ac++] = arg;
        }