main.o checksum.o match.o syscall.o log.o backup.o
OBJS2=options.o flist.o io.o compat.o hlink.o token.o uidlist.o socket.o \
fileio.o batch.o clientname.o
main.o checksum.o match.o syscall.o log.o backup.o
OBJS2=options.o flist.o io.o compat.o hlink.o token.o uidlist.o socket.o \
fileio.o batch.o clientname.o
+ asprintf(&hashfile->name,"%s/%s",hashname,
+ di->d_name);
+ if (do_stat(hashfile->name,&st) == -1) {
+ asprintf(&hashfile->name,"%s/%s",hashname,
+ di->d_name);
+ if (do_stat(hashfile->name,&st) == -1) {
---- orig/options.c 2005-02-16 15:35:53
-+++ options.c 2005-02-14 02:52:09
-@@ -132,6 +132,7 @@ char *log_format = NULL;
+--- orig/options.c 2005-08-27 21:11:26
++++ options.c 2005-05-19 08:55:42
+@@ -141,6 +141,7 @@ char *log_format = NULL;
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," --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");
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");
enum {OPT_VERSION = 1000, OPT_DAEMON, OPT_SENDER, OPT_EXCLUDE, OPT_EXCLUDE_FROM,
OPT_FILTER, OPT_COMPARE_DEST, OPT_COPY_DEST, OPT_LINK_DEST,
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_READ_BATCH, OPT_WRITE_BATCH, OPT_TIMEOUT, OPT_MAX_SIZE,
-+ OPT_READ_BATCH, OPT_WRITE_BATCH, OPT_TIMEOUT, OPT_MAX_SIZE, OPT_LINK_BY_HASH,
+- OPT_INCLUDE, OPT_INCLUDE_FROM, OPT_MODIFY_WINDOW,
++ OPT_INCLUDE, OPT_INCLUDE_FROM, OPT_MODIFY_WINDOW, OPT_LINK_BY_HASH,
+ OPT_READ_BATCH, OPT_WRITE_BATCH, OPT_ONLY_WRITE_BATCH, OPT_MAX_SIZE,
- static struct poptOption long_options[] = {
-@@ -416,6 +418,7 @@ static struct poptOption long_options[]
+@@ -446,6 +448,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 },
+ {"link-by-hash", 0, POPT_ARG_STRING, 0, OPT_LINK_BY_HASH, 0, 0},
{"fuzzy", 'y', POPT_ARG_NONE, &fuzzy_basis, 0, 0, 0 },
{"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 },
+ {"link-by-hash", 0, POPT_ARG_STRING, 0, OPT_LINK_BY_HASH, 0, 0},
{"fuzzy", 'y', POPT_ARG_NONE, &fuzzy_basis, 0, 0, 0 },
{"compress", 'z', POPT_ARG_NONE, &do_compression, 0, 0, 0 },
{"compress", 'z', POPT_ARG_NONE, &do_compression, 0, 0, 0 },
-@@ -840,6 +843,21 @@ int parse_arguments(int *argc, const cha
+ {0, 'P', POPT_ARG_NONE, 0, 'P', 0, 0 },
+@@ -916,6 +919,21 @@ int parse_arguments(int *argc, const cha
-@@ -1392,6 +1410,11 @@ void server_options(char **args,int *arg
+@@ -1507,6 +1525,11 @@ void server_options(char **args,int *arg
-@@ -37,6 +37,7 @@ extern int preserve_hard_links;
- extern int preserve_perms;
- extern int io_error;
+@@ -53,6 +53,7 @@ extern int delay_updates;
+ extern struct stats stats;
+ extern char *log_format;
extern char *tmpdir;
+extern char *link_by_hash_dir;
extern char *partial_dir;
extern char *basis_dir[];
extern char *tmpdir;
+extern char *link_by_hash_dir;
extern char *partial_dir;
extern char *basis_dir[];
- extern int basis_dir_cnt;
-@@ -140,12 +141,13 @@ static int get_tmpname(char *fnametmp, c
+ extern struct file_list *the_file_list;
+@@ -186,12 +187,13 @@ static int get_tmpname(char *fnametmp, c
static int receive_data(int f_in, char *fname_r, int fd_r, OFF_T size_r,
static int receive_data(int f_in, char *fname_r, int fd_r, OFF_T size_r,
-@@ -165,6 +167,9 @@ static int receive_data(int f_in, char *
+@@ -211,6 +213,9 @@ static int receive_data(int f_in, char *
- while ((i = recv_token(f_in, &data)) != 0) {
-@@ -181,6 +186,8 @@ static int receive_data(int f_in, char *
+ if (append_mode) {
+@@ -253,6 +258,8 @@ static int receive_data(int f_in, char *
-@@ -207,6 +214,8 @@ static int receive_data(int f_in, char *
+@@ -279,6 +286,8 @@ static int receive_data(int f_in, char *
-@@ -247,6 +256,8 @@ static int receive_data(int f_in, char *
+@@ -319,6 +328,8 @@ static int receive_data(int f_in, char *
-@@ -292,7 +303,7 @@ static void read_gen_name(int fd, char *
+@@ -334,7 +345,7 @@ static int receive_data(int f_in, char *
+ receive_data(f_in, NULL, -1, 0, NULL, -1, length, NULL);
}
+ receive_data(f_in, NULL, -1, 0, NULL, -1, length, NULL);
}
-
-@@ -555,8 +566,12 @@ int recv_files(int f_in, struct file_lis
+ static void handle_delayed_updates(struct file_list *flist, char *local_name)
+@@ -663,8 +674,12 @@ int recv_files(int f_in, struct file_lis
+#endif
recv_ok = receive_data(f_in, fnamecmp, fd1, st.st_size,
- fname, fd2, file->length);
+ fname, fd2, file->length, file->u.sum);
if (!log_before_transfer)
+#endif
recv_ok = receive_data(f_in, fnamecmp, fd1, st.st_size,
- fname, fd2, file->length);
+ fname, fd2, file->length, file->u.sum);
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;
+ log_item(file, &initial_stats, iflags, NULL);
+--- orig/rsync.c 2005-07-27 23:31:12
++++ rsync.c 2005-02-21 11:04:36
+@@ -38,6 +38,7 @@ extern int inplace;
-@@ -287,7 +288,12 @@ void finish_transfer(char *fname, char *
+
+ /*
+@@ -190,7 +191,12 @@ void finish_transfer(char *fname, char *
rprintf(FINFO, "renaming %s to %s\n",
safe_fname(fnametmp), safe_fname(fname));
}
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",
if (ret < 0) {
rsyserr(FERROR, errno, "%s %s -> \"%s\"",
ret == -2 ? "copy" : "rename",
--compare-dest=DIR also compare received files relative to DIR
--copy-dest=DIR ... and include copies of unchanged files
--link-dest=DIR hardlink to files in DIR when unchanged
--compare-dest=DIR also compare received files relative to DIR
--copy-dest=DIR ... and include copies of unchanged files
--link-dest=DIR hardlink to files in DIR when unchanged