Fixed a failing hunk.
[rsync/rsync-patches.git] / compare-dest.diff
index 8d62217..39d9d1b 100644 (file)
@@ -7,9 +7,9 @@ they are suppled).
 
 Before compiling, be sure to run "make proto".
 
---- orig/generator.c   2004-11-03 20:30:45
+--- orig/generator.c   2004-11-11 22:13:09
 +++ generator.c        2004-11-03 22:47:23
-@@ -45,7 +45,7 @@ extern int io_timeout;
+@@ -46,7 +46,7 @@ extern int io_timeout;
  extern int protocol_version;
  extern int always_checksum;
  extern char *partial_dir;
@@ -18,7 +18,7 @@ Before compiling, be sure to run "make proto".
  extern int link_dest;
  extern int whole_file;
  extern int local_server;
-@@ -424,11 +424,19 @@ static void recv_generator(char *fname, 
+@@ -429,11 +429,19 @@ static void recv_generator(char *fname, 
        fnamecmp = fname;
        fnamecmp_type = FNAMECMP_FNAME;
  
@@ -42,7 +42,7 @@ Before compiling, be sure to run "make proto".
  #if HAVE_LINK
                        if (link_dest && !dry_run) {
                                if (do_link(fnamecmpbuf, fname) < 0) {
-@@ -439,15 +447,14 @@ static void recv_generator(char *fname, 
+@@ -444,15 +452,14 @@ static void recv_generator(char *fname, 
                                                        safe_fname(fname));
                                        }
                                        fnamecmp = fnamecmpbuf;
@@ -80,9 +80,9 @@ Before compiling, be sure to run "make proto".
  
        /* 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     2004-10-14 17:11:40
-+++ options.c  2004-10-14 17:13:57
-@@ -114,12 +114,13 @@ int write_batch = 0;
+--- orig/options.c     2004-11-11 22:13:09
++++ options.c  2004-11-11 22:14:34
+@@ -115,12 +115,13 @@ int write_batch = 0;
  int read_batch = 0;
  int backup_dir_len = 0;
  int backup_suffix_len;
@@ -97,25 +97,25 @@ Before compiling, be sure to run "make proto".
  char *config_file = NULL;
  char *shell_cmd = NULL;
  char *log_format = NULL;
-@@ -140,6 +141,7 @@ char *batch_name = NULL;
+@@ -141,6 +142,7 @@ char *batch_name = NULL;
  
  static int daemon_opt;   /* sets am_daemon after option error-reporting */
  static int modify_window_set;
 +static int saw_compare_dest = 0;
+ static char *max_size_arg;
  
  /** Local address to bind.  As a character string because it's
-  * interpreted by the IPv6 layer: should be a numeric IP4 or IP6
-@@ -310,7 +312,7 @@ void usage(enum logcode F)
+@@ -313,7 +315,7 @@ void usage(enum logcode F)
  }
  
  enum {OPT_VERSION = 1000, OPT_DAEMON, OPT_SENDER, OPT_EXCLUDE, OPT_EXCLUDE_FROM,
 -      OPT_DELETE_AFTER, OPT_DELETE_EXCLUDED, OPT_LINK_DEST,
 +      OPT_DELETE_AFTER, OPT_DELETE_EXCLUDED, OPT_COMPARE_DEST, OPT_LINK_DEST,
        OPT_INCLUDE, OPT_INCLUDE_FROM, OPT_MODIFY_WINDOW,
-       OPT_READ_BATCH, OPT_WRITE_BATCH, OPT_TIMEOUT,
+       OPT_READ_BATCH, OPT_WRITE_BATCH, OPT_TIMEOUT, OPT_MAX_SIZE,
        OPT_REFUSED_BASE = 9000};
-@@ -369,8 +371,8 @@ static struct poptOption long_options[] 
-   {"max-delete",       0,  POPT_ARG_INT,    &max_delete, 0, 0, 0 },
+@@ -373,8 +375,8 @@ static struct poptOption long_options[] 
+   {"max-size",         0,  POPT_ARG_STRING, &max_size_arg,  OPT_MAX_SIZE, 0, 0 },
    {"timeout",          0,  POPT_ARG_INT,    &io_timeout, OPT_TIMEOUT, 0, 0 },
    {"temp-dir",        'T', POPT_ARG_STRING, &tmpdir, 0, 0, 0 },
 -  {"compare-dest",     0,  POPT_ARG_STRING, &compare_dest, 0, 0, 0 },
@@ -125,7 +125,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 },
    {"stats",            0,  POPT_ARG_NONE,   &do_stats, 0, 0, 0 },
-@@ -672,8 +674,28 @@ int parse_arguments(int *argc, const cha
+@@ -705,8 +707,28 @@ int parse_arguments(int *argc, const cha
                                select_timeout = io_timeout;
                        break;
  
@@ -154,7 +154,7 @@ Before compiling, be sure to run "make proto".
                        link_dest = 1;
                        break;
  #else
-@@ -765,6 +787,11 @@ int parse_arguments(int *argc, const cha
+@@ -798,6 +820,11 @@ int parse_arguments(int *argc, const cha
                return 0;
        }
  
@@ -166,7 +166,7 @@ Before compiling, be sure to run "make proto".
        if (archive_mode) {
                if (!files_from)
                        recurse = 1;
-@@ -792,8 +819,6 @@ int parse_arguments(int *argc, const cha
+@@ -825,8 +852,6 @@ int parse_arguments(int *argc, const cha
                        tmpdir = sanitize_path(NULL, tmpdir, NULL, 0);
                if (partial_dir)
                        partial_dir = sanitize_path(NULL, partial_dir, NULL, 0);
@@ -175,7 +175,7 @@ Before compiling, be sure to run "make proto".
                if (backup_dir)
                        backup_dir = sanitize_path(NULL, backup_dir, NULL, 0);
                if (files_from)
-@@ -801,6 +826,7 @@ int parse_arguments(int *argc, const cha
+@@ -834,6 +859,7 @@ int parse_arguments(int *argc, const cha
        }
        if (server_exclude_list.head && !am_sender) {
                struct exclude_list_struct *elp = &server_exclude_list;
@@ -183,7 +183,7 @@ Before compiling, be sure to run "make proto".
                if (tmpdir) {
                        clean_fname(tmpdir, 1);
                        if (check_exclude(elp, tmpdir, 1) < 0)
-@@ -811,9 +837,9 @@ int parse_arguments(int *argc, const cha
+@@ -844,9 +870,9 @@ int parse_arguments(int *argc, const cha
                        if (check_exclude(elp, partial_dir, 1) < 0)
                                goto options_rejected;
                }
@@ -196,7 +196,7 @@ Before compiling, be sure to run "make proto".
                                goto options_rejected;
                }
                if (backup_dir) {
-@@ -884,7 +910,7 @@ int parse_arguments(int *argc, const cha
+@@ -917,7 +943,7 @@ int parse_arguments(int *argc, const cha
                         am_server ? "server" : "client");
                return 0;
  #endif
@@ -205,7 +205,7 @@ Before compiling, be sure to run "make proto".
                        snprintf(err_buf, sizeof err_buf,
                                 "--inplace does not yet work with %s\n",
                                 link_dest ? "--link-dest" : "--compare-dest");
-@@ -951,8 +977,8 @@ int parse_arguments(int *argc, const cha
+@@ -984,8 +1010,8 @@ int parse_arguments(int *argc, const cha
   **/
  void server_options(char **args,int *argc)
  {
@@ -215,7 +215,7 @@ Before compiling, be sure to run "make proto".
        char *arg;
  
        int i, x;
-@@ -1135,13 +1161,16 @@ void server_options(char **args,int *arg
+@@ -1173,13 +1199,16 @@ void server_options(char **args,int *arg
                args[ac++] = tmpdir;
        }