Marc St-Onge
---- orig/backup.c 2005-02-07 20:41:56
+--- orig/backup.c 2005-02-14 02:45:09
+++ backup.c 2004-09-22 02:36:06
@@ -22,11 +22,17 @@
+ deleting = 0;
+ return ret;
+}
---- orig/flist.c 2005-02-13 21:17:16
+--- orig/flist.c 2005-02-14 02:45:10
+++ flist.c 2005-01-30 10:11:42
@@ -46,6 +46,8 @@ extern char curr_dir[MAXPATHLEN];
extern unsigned int curr_dir_len;
extern int copy_links;
extern int copy_unsafe_links;
extern int protocol_version;
-@@ -1709,10 +1712,14 @@ char *f_name(struct file_struct *f)
+@@ -1750,10 +1753,14 @@ char *f_name(struct file_struct *f)
}
+ return k > 0 && strcmp(fn+k, backup_suffix_rm) == 0;
}
-
-@@ -1799,11 +1806,12 @@ void delete_missing(struct file_list *fu
+ struct file_list *get_dirlist(const char *dirname, int ignore_filter_rules)
+@@ -1859,11 +1866,12 @@ void delete_missing(struct file_list *fu
mode = dir_list->files[i]->mode;
if (flist_find(full_list, dir_list->files[i]) < 0) {
char *f = f_name(dir_list->files[i]);
safe_fname(f));
}
} else if (S_ISDIR(mode))
---- orig/options.c 2005-02-13 05:50:28
+--- orig/options.c 2005-02-16 15:35:53
+++ options.c 2005-01-28 19:17:35
-@@ -118,10 +118,14 @@ int no_detach = 0;
+@@ -119,10 +119,14 @@ int no_detach = 0;
int write_batch = 0;
int read_batch = 0;
int backup_dir_len = 0;
char *tmpdir = NULL;
char *partial_dir = NULL;
char *basis_dir[MAX_BASIS_DIRS+1];
-@@ -131,7 +135,9 @@ char *log_format = NULL;
+@@ -132,7 +136,9 @@ char *log_format = NULL;
char *password_file = NULL;
char *rsync_path = RSYNC_PATH;
char *backup_dir = NULL;
int rsync_port = 0;
int compare_dest = 0;
int copy_dest = 0;
-@@ -258,6 +264,8 @@ void usage(enum logcode F)
+@@ -261,6 +267,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);
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," -d, --dirs transfer directories without recursing\n");
-@@ -350,6 +358,7 @@ static struct poptOption long_options[]
+@@ -355,6 +363,7 @@ static struct poptOption long_options[]
/* longName, shortName, argInfo, argPtr, value, descrip, argDesc */
{"version", 0, POPT_ARG_NONE, 0, OPT_VERSION, 0, 0},
{"suffix", 0, POPT_ARG_STRING, &backup_suffix, 0, 0, 0 },
{"rsync-path", 0, POPT_ARG_STRING, &rsync_path, 0, 0, 0 },
{"password-file", 0, POPT_ARG_STRING, &password_file, 0, 0, 0 },
{"ignore-times", 'I', POPT_ARG_NONE, &ignore_times, 0, 0, 0 },
-@@ -427,6 +436,7 @@ static struct poptOption long_options[]
- {"log-format", 0, POPT_ARG_STRING, &log_format, 0, 0, 0 },
+@@ -434,6 +443,7 @@ static struct poptOption long_options[]
+ {"itemize-changes", 'i', POPT_ARG_NONE, &itemize_changes, 0, 0, 0 },
{"bwlimit", 0, POPT_ARG_INT, &bwlimit, 0, 0, 0 },
{"backup-dir", 0, POPT_ARG_STRING, &backup_dir, 0, 0, 0 },
+ {"backup-dir-rm", 0, POPT_ARG_STRING, &backup_dir_rm, 0, 0, 0 },
{"hard-links", 'H', POPT_ARG_NONE, &preserve_hard_links, 0, 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 },
-@@ -968,6 +978,8 @@ int parse_arguments(int *argc, const cha
+@@ -982,6 +992,8 @@ int parse_arguments(int *argc, const cha
partial_dir = sanitize_path(NULL, partial_dir, NULL, 0);
if (backup_dir)
backup_dir = sanitize_path(NULL, backup_dir, NULL, 0);
if (files_from)
files_from = sanitize_path(NULL, files_from, NULL, 0);
}
-@@ -1000,6 +1012,12 @@ int parse_arguments(int *argc, const cha
+@@ -1014,6 +1026,12 @@ int parse_arguments(int *argc, const cha
if (check_filter(elp, backup_dir, 1) < 0)
goto options_rejected;
}
}
if (server_filter_list.head && files_from) {
if (!*files_from)
-@@ -1022,6 +1040,16 @@ int parse_arguments(int *argc, const cha
+@@ -1036,6 +1054,16 @@ int parse_arguments(int *argc, const cha
backup_suffix);
return 0;
}
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;
-@@ -1043,6 +1071,31 @@ int parse_arguments(int *argc, const cha
+@@ -1057,6 +1085,31 @@ int parse_arguments(int *argc, const cha
"--suffix cannot be a null string without --backup-dir\n");
return 0;
}
+ return 0;
+ }
- if (do_progress && !verbose) {
- if (refused_verbose) {
-@@ -1279,6 +1332,10 @@ void server_options(char **args,int *arg
+ if (log_format) {
+ if (strstr(log_format, "%i") != NULL)
+@@ -1305,6 +1358,10 @@ void server_options(char **args,int *arg
args[ac++] = "--backup-dir";
args[ac++] = backup_dir;
}
/* Only send --suffix if it specifies a non-default value. */
if (strcmp(backup_suffix, backup_dir ? "" : BACKUP_SUFFIX) != 0) {
-@@ -1287,7 +1344,13 @@ void server_options(char **args,int *arg
+@@ -1313,7 +1370,13 @@ void server_options(char **args,int *arg
goto oom;
args[ac++] = arg;
}