Fixed a new failing hunk.
authorWayne Davison <wayned@samba.org>
Sat, 15 Jan 2005 04:41:42 +0000 (04:41 +0000)
committerWayne Davison <wayned@samba.org>
Sat, 15 Jan 2005 04:41:42 +0000 (04:41 +0000)
fuzzy.diff

index 895ada664d6deb195394d2635e8decd1bfb790e5..464478928b59f9457594c981374edf6cfb38fc7d 100644 (file)
@@ -14,7 +14,7 @@ Be sure to run "make proto" before "make".
  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
  }
  
  
@@ -82,8 +82,8 @@ Be sure to run "make proto" before "make".
 +
 +              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);
@@ -95,10 +95,8 @@ Be sure to run "make proto" before "make".
 +      /* 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;
@@ -107,7 +105,7 @@ Be sure to run "make proto" before "make".
  
  /*
   * 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;
  
@@ -123,7 +121,7 @@ Be sure to run "make proto" before "make".
        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)
                ;
@@ -132,7 +130,7 @@ Be sure to run "make proto" before "make".
        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);
@@ -178,7 +176,7 @@ Be sure to run "make proto" before "make".
  
        /* 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;
@@ -192,7 +190,7 @@ Be sure to run "make proto" before "make".
    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");
@@ -208,7 +206,7 @@ Be sure to run "make proto" before "make".
                         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",
@@ -278,13 +276,13 @@ Be sure to run "make proto" before "make".
  
  
  /* 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