Work with latest g2r-basis-filename.diff patch.
authorWayne Davison <wayned@samba.org>
Fri, 23 Jul 2004 17:22:20 +0000 (17:22 +0000)
committerWayne Davison <wayned@samba.org>
Fri, 23 Jul 2004 17:22:20 +0000 (17:22 +0000)
compare-dest.diff
fuzzy.diff

index bfc6b88..a2423c6 100644 (file)
@@ -39,7 +39,7 @@ Before compiling, be sure to run "make proto".
                }
                file_checksum(fname,sum,st->st_size);
                return memcmp(sum, file->u.sum, protocol_version < 21 ? 2
-@@ -414,13 +413,18 @@ static void recv_generator(char *fname, 
+@@ -413,13 +412,18 @@ static void recv_generator(char *fname, 
  
        fnamecmp = fname;
  
@@ -74,16 +74,16 @@ Before compiling, be sure to run "make proto".
  extern char *rsync_path;
  extern char *shell_cmd;
  extern char *batch_name;
-@@ -456,7 +456,7 @@ static int do_recv(int f_in,int f_out,st
+@@ -458,7 +458,7 @@ static int do_recv(int f_in,int f_out,st
        int pid;
        int status = 0;
        int error_pipe[2], name_pipe[2];
--      int need_name_pipe = compare_dest;
-+      int need_name_pipe = compare_dest[0];
+-      BOOL need_name_pipe = compare_dest && !dry_run;
++      BOOL need_name_pipe = compare_dest[0] && !dry_run;
  
        if (preserve_hard_links)
                init_hard_links(flist);
---- orig/options.c     2004-07-21 23:59:35
+--- orig/options.c     2004-07-23 17:16:13
 +++ options.c  2004-07-03 17:33:30
 @@ -118,7 +118,8 @@ unsigned int backup_dir_remainder;
  
@@ -103,7 +103,7 @@ Before compiling, be sure to run "make proto".
  
  /** Local address to bind.  As a character string because it's
   * interpreted by the IPv6 layer: should be a numeric IP4 or IP6
-@@ -314,7 +316,7 @@ void usage(enum logcode F)
+@@ -315,7 +317,7 @@ void usage(enum logcode F)
  }
  
  enum {OPT_VERSION = 1000, OPT_SENDER, OPT_EXCLUDE, OPT_EXCLUDE_FROM,
@@ -112,7 +112,7 @@ Before compiling, be sure to run "make proto".
        OPT_INCLUDE, OPT_INCLUDE_FROM, OPT_MODIFY_WINDOW,
        OPT_READ_BATCH, OPT_WRITE_BATCH, OPT_TIMEOUT,
        OPT_REFUSED_BASE = 9000};
-@@ -373,8 +375,8 @@ static struct poptOption long_options[] 
+@@ -374,8 +376,8 @@ static struct poptOption long_options[] 
    {"max-delete",       0,  POPT_ARG_INT,    &max_delete, 0, 0, 0 },
    {"timeout",          0,  POPT_ARG_INT,    &io_timeout, OPT_TIMEOUT, 0, 0 },
    {"temp-dir",        'T', POPT_ARG_STRING, &tmpdir, 0, 0, 0 },
@@ -123,7 +123,7 @@ Before compiling, be sure to run "make proto".
    /* TODO: Should this take an optional int giving the compression level? */
    {"compress",        'z', POPT_ARG_NONE,   &do_compression, 0, 0, 0 },
    {"daemon",           0,  POPT_ARG_NONE,   &daemon_opt, 0, 0, 0 },
-@@ -590,8 +592,36 @@ int parse_arguments(int *argc, const cha
+@@ -591,8 +593,36 @@ int parse_arguments(int *argc, const cha
                                select_timeout = io_timeout;
                        break;
  
@@ -160,7 +160,7 @@ Before compiling, be sure to run "make proto".
                        link_dest = 1;
                        break;
  #else
-@@ -689,6 +719,11 @@ int parse_arguments(int *argc, const cha
+@@ -690,6 +720,11 @@ int parse_arguments(int *argc, const cha
                exit_cleanup(RERR_SYNTAX);
        }
  
@@ -172,7 +172,7 @@ Before compiling, be sure to run "make proto".
        if (archive_mode) {
                if (!files_from)
                        recurse = 1;
-@@ -717,8 +752,6 @@ int parse_arguments(int *argc, const cha
+@@ -718,8 +753,6 @@ int parse_arguments(int *argc, const cha
                        (*argv)[i] = alloc_sanitize_path((*argv)[i], NULL);
                if (tmpdir)
                        tmpdir = alloc_sanitize_path(tmpdir, curr_dir);
@@ -181,7 +181,7 @@ Before compiling, be sure to run "make proto".
                if (backup_dir)
                        backup_dir = alloc_sanitize_path(backup_dir, curr_dir);
                if (files_from)
-@@ -824,8 +857,8 @@ int parse_arguments(int *argc, const cha
+@@ -825,8 +858,8 @@ int parse_arguments(int *argc, const cha
   **/
  void server_options(char **args,int *argc)
  {
@@ -191,7 +191,7 @@ Before compiling, be sure to run "make proto".
        char *arg;
  
        int i, x;
-@@ -1003,13 +1036,16 @@ void server_options(char **args,int *arg
+@@ -1004,13 +1037,16 @@ void server_options(char **args,int *arg
                args[ac++] = tmpdir;
        }
  
@@ -221,7 +221,7 @@ Before compiling, be sure to run "make proto".
  extern int make_backups;
  extern int do_progress;
  extern char *backup_dir;
---- orig/rsync.h       2004-07-20 21:36:08
+--- orig/rsync.h       2004-07-23 17:16:13
 +++ rsync.h    2004-07-03 17:33:30
 @@ -98,6 +98,8 @@
  
index 98eeaac..3f93023 100644 (file)
@@ -120,7 +120,7 @@ Be sure to run "make proto" before "make".
        char *fnamecmp;
        char fnamecmpbuf[MAXPATHLEN];
  
-@@ -442,6 +531,14 @@ static void recv_generator(char *fname, 
+@@ -441,6 +530,14 @@ static void recv_generator(char *fname, 
        } else
                *fnamecmpbuf = '\0';
  
@@ -135,7 +135,7 @@ Be sure to run "make proto" before "make".
        if (statret == -1) {
                if (preserve_hard_links && hard_link_check(file, HL_SKIP))
                        return;
-@@ -479,7 +576,7 @@ static void recv_generator(char *fname, 
+@@ -478,7 +575,7 @@ static void recv_generator(char *fname, 
                return;
        }
  
@@ -154,16 +154,16 @@ Be sure to run "make proto" before "make".
  extern int relative_paths;
  extern int rsync_port;
  extern int whole_file;
-@@ -456,7 +457,7 @@ static int do_recv(int f_in,int f_out,st
+@@ -458,7 +459,7 @@ static int do_recv(int f_in,int f_out,st
        int pid;
        int status = 0;
        int error_pipe[2], name_pipe[2];
--      int need_name_pipe = compare_dest;
-+      int need_name_pipe = compare_dest || fuzzy;
+-      BOOL need_name_pipe = compare_dest && !dry_run;
++      BOOL need_name_pipe = (compare_dest || fuzzy) && !dry_run;
  
        if (preserve_hard_links)
                init_hard_links(flist);
---- orig/options.c     2004-07-21 23:59:35
+--- orig/options.c     2004-07-23 17:16:13
 +++ options.c  2004-07-16 20:14:12
 @@ -85,6 +85,7 @@ int safe_symlinks = 0;
  int copy_unsafe_links = 0;
@@ -173,15 +173,15 @@ Be sure to run "make proto" before "make".
  size_t bwlimit_writemax = 0;
  int delete_after = 0;
  int only_existing = 0;
-@@ -276,6 +277,7 @@ void usage(enum logcode F)
-   rprintf(F," -T  --temp-dir=DIR          create temporary files in directory DIR\n");
+@@ -277,6 +278,7 @@ void usage(enum logcode F)
+   rprintf(F," -T, --temp-dir=DIR          create temporary files in directory DIR\n");
    rprintf(F,"     --compare-dest=DIR      also compare destination files relative to DIR\n");
    rprintf(F,"     --link-dest=DIR         create hardlinks to DIR for unchanged files\n");
 +  rprintf(F,"     --fuzzy                 use similar file as basis if basis doesn't exist\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");
-@@ -375,6 +377,7 @@ static struct poptOption long_options[] 
+@@ -376,6 +378,7 @@ static struct poptOption long_options[] 
    {"temp-dir",        'T', POPT_ARG_STRING, &tmpdir, 0, 0, 0 },
    {"compare-dest",     0,  POPT_ARG_STRING, &compare_dest, 0, 0, 0 },
    {"link-dest",        0,  POPT_ARG_STRING, &compare_dest,  OPT_LINK_DEST, 0, 0 },
@@ -189,7 +189,7 @@ Be sure to run "make proto" before "make".
    /* TODO: Should this take an optional int giving the compression level? */
    {"compress",        'z', POPT_ARG_NONE,   &do_compression, 0, 0, 0 },
    {"daemon",           0,  POPT_ARG_NONE,   &daemon_opt, 0, 0, 0 },
-@@ -1024,6 +1027,9 @@ void server_options(char **args,int *arg
+@@ -1025,6 +1028,9 @@ void server_options(char **args,int *arg
                }
        }
  
@@ -209,7 +209,7 @@ Be sure to run "make proto" before "make".
  extern int make_backups;
  extern int do_progress;
  extern char *backup_dir;
---- orig/rsync.yo      2004-07-20 21:36:08
+--- orig/rsync.yo      2004-07-23 17:16:13
 +++ rsync.yo   2004-07-03 19:27:25
 @@ -326,6 +326,7 @@ verb(
   -T  --temp-dir=DIR          create temporary files in directory DIR