extern int always_checksum;
extern char *partial_dir;
extern char *basis_dir[];
-@@ -239,6 +240,92 @@ static void generate_and_send_sums(int f
+@@ -239,6 +240,90 @@ static void generate_and_send_sums(int f
}
+
+ score = measure_name(dname, basename, ext);
+ if (verbose > 4) {
-+ rprintf(FINFO, "[%s] fuzzy score for %s = %u\n",
-+ who_am_i(), dname, score);
++ rprintf(FINFO, "fuzzy score for %s = %u\n",
++ dname, score);
+ }
+ if (score > bestscore) {
+ strlcpy(bestname, dname, sizeof bestname);
+ /* Found a candidate. */
+ if (bestscore != 0) {
+ pathjoin(buf, MAXPATHLEN, dirname, bestname);
-+ if (verbose > 2) {
-+ rprintf(FINFO, "[%s] fuzzy match %s->%s\n",
-+ who_am_i(), fname, buf);
-+ }
++ if (verbose > 2)
++ rprintf(FINFO, "fuzzy match %s->%s\n", fname, buf);
+ return link_stat(buf, st_ptr, 0);
+ }
+ return -1;
/*
* Acts on file number @p i from @p flist, whose name is @p fname.
-@@ -493,6 +580,15 @@ static void recv_generator(char *fname,
+@@ -493,6 +578,15 @@ static void recv_generator(char *fname,
} else
partialptr = NULL;
if (statret == -1) {
if (preserve_hard_links && hard_link_check(file, HL_SKIP))
return;
-@@ -521,6 +617,8 @@ static void recv_generator(char *fname,
+@@ -521,6 +615,8 @@ static void recv_generator(char *fname,
if ((link_dest || copy_dest) && fnamecmp_type != FNAMECMP_FNAME)
;
else if (unchanged_file(fnamecmp, file, &st)) {
if (fnamecmp_type == FNAMECMP_FNAME)
set_perms(fname, file, &st, PERMS_REPORT);
-@@ -593,8 +691,24 @@ prepare_to_open:
+@@ -593,8 +689,24 @@ prepare_to_open:
notify_others:
write_int(f_out, i);
/* The receiving side mustn't obey this, or an existing symlink that
* points to an identical file won't be replaced by the referent. */
---- orig/options.c 2005-01-01 21:11:00
+--- orig/options.c 2005-01-15 04:40:15
+++ options.c 2004-11-29 01:36:48
@@ -86,6 +86,7 @@ int copy_unsafe_links = 0;
int size_only = 0;
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," --fuzzy use similar file as basis if basis doesn't exist\n");
++ rprintf(F," --fuzzy find similar file for basis when no dest file\n");
rprintf(F," -P equivalent to --partial --progress\n");
rprintf(F," -z, --compress compress file data\n");
rprintf(F," -C, --cvs-exclude auto ignore files in the same way CVS does\n");
am_server ? "server" : "client");
return 0;
#endif
-- if (compare_dest || copy_dest || link_dest) {
+- if (dest_option) {
+ if (dest_option || fuzzy_basis) {
snprintf(err_buf, sizeof err_buf,
"--inplace does not yet work with %s\n",
/* Log-message categories. FLOG is only used on the daemon side to
---- orig/rsync.yo 2005-01-01 21:11:01
+--- orig/rsync.yo 2005-01-15 04:36:32
+++ rsync.yo 2004-11-27 18:15:22
@@ -358,6 +358,7 @@ verb(
--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
-+ --fuzzy use similar file as basis if basis is gone
++ --fuzzy find similar file for basis when no dest
-P equivalent to --partial --progress
-z, --compress compress file data
-C, --cvs-exclude auto ignore files in the same way CVS does