+ deleting = 0;
+ return ret;
+}
---- orig/flist.c 2005-02-14 02:45:10
-+++ flist.c 2005-01-30 10:11:42
+--- orig/flist.c 2005-02-19 09:27:48
++++ flist.c 2005-02-19 09:29:36
@@ -46,6 +46,8 @@ extern char curr_dir[MAXPATHLEN];
extern unsigned int curr_dir_len;
extern char *backup_dir;
extern int copy_links;
extern int copy_unsafe_links;
extern int protocol_version;
-@@ -1750,10 +1753,14 @@ char *f_name(struct file_struct *f)
+@@ -1751,10 +1754,14 @@ char *f_name(struct file_struct *f)
}
}
struct file_list *get_dirlist(const char *dirname, int ignore_filter_rules)
-@@ -1859,11 +1866,12 @@ void delete_missing(struct file_list *fu
+@@ -1860,9 +1867,10 @@ 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]);
&& !S_ISDIR(mode)) {
- make_backup(f);
+ safe_delete(f);
- if (verbose) {
-- rprintf(FINFO, "deleting %s\n",
-+ rprintf(FINFO, "safe-deleting %s\n",
- safe_fname(f));
- }
+ if (verbose || log_format)
+ log_delete(f, mode);
} else if (S_ISDIR(mode))
---- orig/options.c 2005-02-16 15:35:53
+--- orig/options.c 2005-02-19 09:27:48
+++ options.c 2005-01-28 19:17:35
@@ -119,10 +119,14 @@ int no_detach = 0;
int write_batch = 0;
int rsync_port = 0;
int compare_dest = 0;
int copy_dest = 0;
-@@ -261,6 +267,8 @@ void usage(enum logcode F)
+@@ -262,6 +268,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");
-@@ -355,6 +363,7 @@ static struct poptOption long_options[]
+@@ -356,6 +364,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 },
-@@ -434,6 +443,7 @@ static struct poptOption long_options[]
+@@ -435,6 +444,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 },
{"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 },
-@@ -982,6 +992,8 @@ int parse_arguments(int *argc, const cha
+@@ -980,6 +990,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);
}
-@@ -1014,6 +1026,12 @@ int parse_arguments(int *argc, const cha
+@@ -1012,6 +1024,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)
-@@ -1036,6 +1054,16 @@ int parse_arguments(int *argc, const cha
+@@ -1034,6 +1052,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;
-@@ -1057,6 +1085,31 @@ int parse_arguments(int *argc, const cha
+@@ -1055,6 +1083,31 @@ int parse_arguments(int *argc, const cha
"--suffix cannot be a null string without --backup-dir\n");
return 0;
}
if (log_format) {
if (strstr(log_format, "%i") != NULL)
-@@ -1305,6 +1358,10 @@ void server_options(char **args,int *arg
+@@ -1318,6 +1371,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) {
-@@ -1313,7 +1370,13 @@ void server_options(char **args,int *arg
+@@ -1326,7 +1383,13 @@ void server_options(char **args,int *arg
goto oom;
args[ac++] = arg;
}
#define RERR_SIGNAL 20 /* status returned when sent SIGUSR1, SIGINT */
#define RERR_WAITCHILD 21 /* some error returned by waitpid() */
---- orig/flist.c 2005-02-14 02:45:10
-+++ flist.c 2005-02-12 19:26:37
-@@ -67,6 +67,7 @@ extern int sanitize_paths;
- extern int max_delete;
+--- orig/flist.c 2005-02-19 09:27:48
++++ flist.c 2005-02-19 09:31:41
+@@ -68,6 +68,7 @@ extern int max_delete;
extern int orig_umask;
extern int list_only;
+ extern char *log_format;
+extern char *fname_convert_cmd;
extern struct filter_list_struct filter_list;
extern struct filter_list_struct server_filter_list;
-@@ -345,7 +346,10 @@ void send_file_entry(struct file_struct
+@@ -346,7 +347,10 @@ void send_file_entry(struct file_struct
io_write_phase = "send_file_entry";
flags = base_flags;
-@@ -561,6 +565,9 @@ static struct file_struct *receive_file_
+@@ -562,6 +566,9 @@ static struct file_struct *receive_file_
strlcpy(lastname, thisname, MAXPATHLEN);
clean_fname(thisname, 0);
if (sanitize_paths)
-@@ -1074,6 +1081,9 @@ struct file_list *send_file_list(int f,
+@@ -1075,6 +1082,9 @@ struct file_list *send_file_list(int f,
start_write = stats.total_written;
gettimeofday(&start_tv, NULL);
flist = flist_new(WITH_HLINK, "send_file_list");
io_start_buffering_out();
-@@ -1256,6 +1266,9 @@ struct file_list *send_file_list(int f,
+@@ -1257,6 +1267,9 @@ struct file_list *send_file_list(int f,
stats.flist_size = stats.total_written - start_write;
stats.num_files = flist->count;
if (verbose > 3)
output_flist(flist, who_am_i());
-@@ -1277,6 +1290,9 @@ struct file_list *recv_file_list(int f)
+@@ -1278,6 +1291,9 @@ struct file_list *recv_file_list(int f)
start_read = stats.total_read;
flist = flist_new(WITH_HLINK, "recv_file_list");
received_flist = flist;
-@@ -1330,6 +1346,9 @@ struct file_list *recv_file_list(int f)
+@@ -1331,6 +1347,9 @@ struct file_list *recv_file_list(int f)
io_error |= read_int(f);
}
+ if (verbose > 2)
+ rprintf(FINFO, "Converted filename: %s -> %s\n", src, dest);
+}
---- orig/generator.c 2005-02-14 02:45:10
+--- orig/generator.c 2005-02-19 09:27:48
+++ generator.c 2005-02-03 02:07:33
-@@ -289,7 +289,13 @@ static int find_fuzzy(struct file_struct
+@@ -331,7 +331,13 @@ static int find_fuzzy(struct file_struct
* start sending checksums.
*
* Note that f_out is set to -1 when doing final directory-permission and
static void recv_generator(char *fname, struct file_list *flist,
struct file_struct *file, int ndx,
int f_out, int f_out_name)
---- orig/log.c 2005-02-07 20:41:56
+--- orig/log.c 2005-02-19 09:27:48
+++ log.c 2004-07-03 20:18:02
-@@ -57,6 +57,7 @@ struct {
+@@ -60,6 +60,7 @@ struct {
{ RERR_STREAMIO , "error in rsync protocol data stream" },
{ RERR_MESSAGEIO , "errors with program diagnostics" },
{ RERR_IPC , "error in IPC code" },
{ RERR_SIGNAL , "received SIGUSR1 or SIGINT" },
{ RERR_WAITCHILD , "some error returned by waitpid()" },
{ RERR_MALLOC , "error allocating core memory buffers" },
---- orig/main.c 2005-02-14 02:45:10
+--- orig/main.c 2005-02-16 17:08:13
+++ main.c 2004-07-22 00:31:47
@@ -359,7 +359,7 @@ static pid_t do_cmd(char *cmd, char *mac
whole_file = 1;
if (dir)
free(dir);
---- orig/options.c 2005-02-14 02:45:10
+--- orig/options.c 2005-02-19 09:27:48
+++ options.c 2005-02-14 02:50:32
@@ -129,6 +129,7 @@ char *basis_dir[MAX_BASIS_DIRS+1];
char *config_file = NULL;
char *password_file = NULL;
char *rsync_path = RSYNC_PATH;
char *backup_dir = NULL;
-@@ -307,6 +308,7 @@ void usage(enum logcode F)
+@@ -310,6 +311,7 @@ void usage(enum logcode F)
rprintf(F," --compare-dest=DIR also compare destination files relative to DIR\n");
rprintf(F," --copy-dest=DIR ... and include copies of unchanged files\n");
rprintf(F," --link-dest=DIR hardlink to files in DIR when unchanged\n");
rprintf(F," -z, --compress compress file data during the transfer\n");
rprintf(F," -C, --cvs-exclude auto-ignore files the same way CVS does\n");
rprintf(F," -f, --filter=RULE add a file-filtering RULE\n");
-@@ -414,6 +416,7 @@ static struct poptOption long_options[]
+@@ -418,6 +420,7 @@ static struct poptOption long_options[]
{"copy-dest", 0, POPT_ARG_STRING, 0, OPT_COPY_DEST, 0, 0 },
{"link-dest", 0, POPT_ARG_STRING, 0, OPT_LINK_DEST, 0, 0 },
{"fuzzy", 'y', POPT_ARG_NONE, &fuzzy_basis, 0, 0, 0 },
+
+ return result;
+}
---- orig/util.c 2005-02-14 02:45:11
+--- orig/util.c 2005-02-18 20:17:35
+++ util.c 2004-07-03 20:18:02
@@ -1331,3 +1331,55 @@ uint32 fuzzy_distance(const char *s1, in
+}
+
+#endif
---- orig/options.c 2005-02-16 15:35:53
+--- orig/options.c 2005-02-19 09:27:48
+++ options.c 2005-02-14 02:52:09
@@ -132,6 +132,7 @@ char *log_format = NULL;
char *password_file = NULL;
char backup_dir_buf[MAXPATHLEN];
int rsync_port = 0;
int compare_dest = 0;
-@@ -309,6 +310,7 @@ void usage(enum logcode F)
+@@ -310,6 +311,7 @@ void usage(enum logcode F)
rprintf(F," --compare-dest=DIR also compare destination files relative to DIR\n");
rprintf(F," --copy-dest=DIR ... and include copies of unchanged files\n");
rprintf(F," --link-dest=DIR hardlink to files in DIR when unchanged\n");
rprintf(F," -z, --compress compress file data during the transfer\n");
rprintf(F," -C, --cvs-exclude auto-ignore files the same way CVS does\n");
rprintf(F," -f, --filter=RULE add a file-filtering RULE\n");
-@@ -348,7 +350,7 @@ void usage(enum logcode F)
+@@ -349,7 +351,7 @@ void usage(enum logcode F)
enum {OPT_VERSION = 1000, OPT_DAEMON, OPT_SENDER, OPT_EXCLUDE, OPT_EXCLUDE_FROM,
OPT_FILTER, OPT_COMPARE_DEST, OPT_COPY_DEST, OPT_LINK_DEST,
OPT_INCLUDE, OPT_INCLUDE_FROM, OPT_MODIFY_WINDOW,
OPT_REFUSED_BASE = 9000};
static struct poptOption long_options[] = {
-@@ -416,6 +418,7 @@ static struct poptOption long_options[]
+@@ -417,6 +419,7 @@ static struct poptOption long_options[]
{"compare-dest", 0, POPT_ARG_STRING, 0, OPT_COMPARE_DEST, 0, 0 },
{"copy-dest", 0, POPT_ARG_STRING, 0, OPT_COPY_DEST, 0, 0 },
{"link-dest", 0, POPT_ARG_STRING, 0, OPT_LINK_DEST, 0, 0 },
{"fuzzy", 'y', POPT_ARG_NONE, &fuzzy_basis, 0, 0, 0 },
/* TODO: Should this take an optional int giving the compression level? */
{"compress", 'z', POPT_ARG_NONE, &do_compression, 0, 0, 0 },
-@@ -840,6 +843,21 @@ int parse_arguments(int *argc, const cha
+@@ -838,6 +841,21 @@ int parse_arguments(int *argc, const cha
basis_dir[basis_dir_cnt++] = (char *)arg;
break;
default:
/* A large opt value means that set_refuse_options()
* turned this option off. */
-@@ -1392,6 +1410,11 @@ void server_options(char **args,int *arg
+@@ -1405,6 +1423,11 @@ void server_options(char **args,int *arg
}
}
if (files_from && (!am_sender || remote_filesfrom_file)) {
if (remote_filesfrom_file) {
args[ac++] = "--files-from";
---- orig/receiver.c 2005-02-16 15:35:53
+--- orig/receiver.c 2005-02-19 09:27:48
+++ receiver.c 2005-01-15 21:29:13
@@ -37,6 +37,7 @@ extern int preserve_hard_links;
extern int preserve_perms;
}
-@@ -555,8 +566,12 @@ int recv_files(int f_in, struct file_lis
+@@ -558,8 +569,12 @@ int recv_files(int f_in, struct file_lis
rprintf(FINFO, "%s\n", safe_fname(fname));
/* recv file data */
if (!log_before_transfer)
log_recv(file, &initial_stats, iflags);
---- orig/rsync.c 2005-02-14 02:45:10
-+++ rsync.c 2005-02-07 21:11:30
-@@ -36,6 +36,7 @@ extern int force_delete;
- extern int recurse;
- extern int keep_dirlinks;
+--- orig/rsync.c 2005-02-19 09:27:48
++++ rsync.c 2005-02-19 09:32:31
+@@ -40,6 +40,7 @@ extern int keep_dirlinks;
extern int make_backups;
-+extern char *link_by_hash_dir;
+ extern struct stats stats;
extern char *backup_dir;
- extern int inplace;
++extern char *link_by_hash_dir;
+ extern char *log_format;
+
-@@ -287,7 +288,12 @@ void finish_transfer(char *fname, char *
+@@ -279,7 +280,12 @@ void finish_transfer(char *fname, char *
rprintf(FINFO, "renaming %s to %s\n",
safe_fname(fnametmp), safe_fname(fname));
}
if (ret < 0) {
rsyserr(FERROR, errno, "%s %s -> \"%s\"",
ret == -2 ? "copy" : "rename",
---- orig/rsync.h 2005-02-16 15:35:54
+--- orig/rsync.h 2005-02-19 09:27:49
+++ rsync.h 2004-07-03 20:20:15
-@@ -618,6 +618,14 @@ struct stats {
+@@ -619,6 +619,14 @@ struct stats {
int current_file_index;
};
#include "byteorder.h"
#include "lib/mdfour.h"
---- orig/rsync.yo 2005-02-16 15:35:54
+--- orig/rsync.yo 2005-02-19 09:27:49
+++ rsync.yo 2005-02-13 06:58:47
@@ -355,6 +355,7 @@ to the detailed description below for a
--compare-dest=DIR also compare received files relative to DIR
rsync -avoogg host:/from/ /to/
---- orig/compat.c 2005-02-14 02:47:53
-+++ compat.c 2005-02-14 02:53:52
-@@ -28,11 +28,14 @@
- int remote_protocol = 0;
+--- orig/compat.c 2005-02-19 09:27:48
++++ compat.c 2005-02-19 09:33:44
+@@ -29,11 +29,14 @@ int remote_protocol = 0;
extern int verbose;
+ extern int itemize_changes;
+extern int am_root;
extern int am_server;
extern int am_sender;
extern int protocol_version;
void setup_protocol(int f_out,int f_in)
-@@ -89,4 +92,11 @@ void setup_protocol(int f_out,int f_in)
+@@ -93,4 +96,11 @@ void setup_protocol(int f_out,int f_in)
} else {
checksum_seed = read_int(f_in);
}
+ preserve_gid = 2;
+ }
}
---- orig/options.c 2005-02-15 19:27:05
+--- orig/options.c 2005-02-19 09:27:48
+++ options.c 2004-09-09 01:59:08
-@@ -391,8 +391,8 @@ static struct poptOption long_options[]
+@@ -393,8 +393,8 @@ static struct poptOption long_options[]
{"no-whole-file", 0, POPT_ARG_VAL, &whole_file, 0, 0, 0 },
{"copy-unsafe-links",0, POPT_ARG_NONE, ©_unsafe_links, 0, 0, 0 },
{"perms", 'p', POPT_ARG_NONE, &preserve_perms, 0, 0, 0 },
{"devices", 'D', POPT_ARG_NONE, &preserve_devices, 0, 0, 0 },
{"times", 't', POPT_ARG_NONE, &preserve_times, 0, 0, 0 },
{"omit-dir-times", 'O', POPT_ARG_NONE, &omit_dir_times, 0, 0, 0 },
-@@ -722,6 +722,14 @@ int parse_arguments(int *argc, const cha
+@@ -723,6 +723,14 @@ int parse_arguments(int *argc, const cha
usage(FINFO);
exit_cleanup(0);
case 'v':
verbose++;
break;
-@@ -932,8 +940,8 @@ int parse_arguments(int *argc, const cha
+@@ -933,8 +941,8 @@ int parse_arguments(int *argc, const cha
#endif
preserve_perms = 1;
preserve_times = 1;
preserve_devices = 1;
}
-@@ -1211,10 +1219,16 @@ void server_options(char **args,int *arg
+@@ -1233,10 +1241,16 @@ void server_options(char **args,int *arg
argstr[x++] = 'i';
if (preserve_hard_links)
argstr[x++] = 'H';
if (preserve_devices)
argstr[x++] = 'D';
if (preserve_times)
---- orig/rsync.c 2005-02-14 02:45:10
+--- orig/rsync.c 2005-02-19 09:27:48
+++ rsync.c 2005-02-01 10:46:04
-@@ -26,7 +26,6 @@ extern int verbose;
- extern int dry_run;
+@@ -27,7 +27,6 @@ extern int dry_run;
+ extern int itemize_changes;
extern int preserve_times;
extern int omit_dir_times;
-extern int am_root;
extern int am_server;
extern int am_sender;
extern int am_generator;
-@@ -182,7 +181,7 @@ int set_perms(char *fname,struct file_st
+@@ -174,7 +173,7 @@ int set_perms(char *fname,struct file_st
updated = 1;
}