Got rid of some patch fuzz.
authorWayne Davison <wayned@samba.org>
Mon, 5 Jun 2006 20:58:58 +0000 (20:58 +0000)
committerWayne Davison <wayned@samba.org>
Mon, 5 Jun 2006 20:58:58 +0000 (20:58 +0000)
flags.diff
link-by-hash.diff
xattrs.diff

index f1006c2..13e7e4b 100644 (file)
@@ -104,7 +104,7 @@ Modified from a patch that was written by Rolf Grossmann:
  
 --- old/generator.c
 +++ new/generator.c
-@@ -124,6 +124,9 @@ static int delete_item(char *fname, int 
+@@ -123,6 +123,9 @@ static int delete_item(char *fname, int 
        if (!S_ISDIR(mode)) {
                if (max_delete && ++deletion_count > max_delete)
                        return 0;
@@ -114,7 +114,7 @@ Modified from a patch that was written by Rolf Grossmann:
                if (make_backups && (backup_dir || !is_backup_file(fname)))
                        ok = make_backup(fname);
                else
-@@ -148,10 +151,17 @@ static int delete_item(char *fname, int 
+@@ -147,10 +150,17 @@ static int delete_item(char *fname, int 
                ok = 0;
                errno = ENOTEMPTY;
        } else if (make_backups && !backup_dir && !is_backup_file(fname)
@@ -175,7 +175,7 @@ Modified from a patch that was written by Rolf Grossmann:
                (int) (sizeof dumstat->st_ino * 8),
                (int) (sizeof (int64) * 8));
  #ifdef MAINTAINER_MODE
-@@ -298,6 +304,7 @@ void usage(enum logcode F)
+@@ -302,6 +308,7 @@ void usage(enum logcode F)
    rprintf(F," -K, --keep-dirlinks         treat symlinked dir on receiver as dir\n");
    rprintf(F," -H, --hard-links            preserve hard links\n");
    rprintf(F," -p, --perms                 preserve permissions\n");
@@ -183,7 +183,7 @@ Modified from a patch that was written by Rolf Grossmann:
    rprintf(F," -E, --executability         preserve the file's executability\n");
    rprintf(F,"     --chmod=CHMOD           change destination permissions\n");
    rprintf(F," -o, --owner                 preserve owner (super-user only)\n");
-@@ -414,6 +421,8 @@ static struct poptOption long_options[] 
+@@ -420,6 +427,8 @@ static struct poptOption long_options[] 
    {"perms",           'p', POPT_ARG_VAL,    &preserve_perms, 1, 0, 0 },
    {"no-perms",         0,  POPT_ARG_VAL,    &preserve_perms, 0, 0, 0 },
    {"no-p",             0,  POPT_ARG_VAL,    &preserve_perms, 0, 0, 0 },
@@ -192,7 +192,7 @@ Modified from a patch that was written by Rolf Grossmann:
    {"executability",   'E', POPT_ARG_NONE,   &preserve_executability, 0, 0, 0 },
    {"times",           't', POPT_ARG_VAL,    &preserve_times, 1, 0, 0 },
    {"no-times",         0,  POPT_ARG_VAL,    &preserve_times, 0, 0, 0 },
-@@ -1119,6 +1128,15 @@ int parse_arguments(int *argc, const cha
+@@ -1122,6 +1131,15 @@ int parse_arguments(int *argc, const cha
        }
  #endif
  
@@ -208,7 +208,7 @@ Modified from a patch that was written by Rolf Grossmann:
        if (write_batch && read_batch) {
                snprintf(err_buf, sizeof err_buf,
                        "--write-batch and --read-batch can not be used together\n");
-@@ -1577,6 +1595,9 @@ void server_options(char **args,int *arg
+@@ -1579,6 +1597,9 @@ void server_options(char **args,int *arg
        if (xfer_dirs && !recurse && delete_mode && am_sender)
                args[ac++] = "--no-r";
  
@@ -220,15 +220,15 @@ Modified from a patch that was written by Rolf Grossmann:
                        goto oom;
 --- old/rsync.c
 +++ new/rsync.c
-@@ -34,6 +34,7 @@ extern int verbose;
+@@ -33,6 +33,7 @@
+ extern int verbose;
  extern int dry_run;
- extern int logfile_format_has_i;
  extern int preserve_perms;
 +extern int preserve_flags;
  extern int preserve_executability;
  extern int preserve_times;
  extern int omit_dir_times;
-@@ -217,6 +218,19 @@ int set_file_attrs(char *fname, struct f
+@@ -216,6 +217,19 @@ int set_file_attrs(char *fname, struct f
        }
  #endif
  
@@ -246,9 +246,9 @@ Modified from a patch that was written by Rolf Grossmann:
 +#endif
 +
        if (verbose > 1 && flags & ATTRS_REPORT) {
-               enum logcode code = logfile_format_has_i || dry_run
-                                 ? FCLIENT : FINFO;
-@@ -252,6 +266,10 @@ void finish_transfer(char *fname, char *
+               if (updated)
+                       rprintf(FCLIENT, "%s\n", fname);
+@@ -249,6 +263,10 @@ void finish_transfer(char *fname, char *
  {
        int ret;
  
@@ -259,7 +259,7 @@ Modified from a patch that was written by Rolf Grossmann:
        if (inplace) {
                if (verbose > 2)
                        rprintf(FINFO, "finishing %s\n", fname);
-@@ -305,3 +323,21 @@ const char *who_am_i(void)
+@@ -302,3 +320,21 @@ const char *who_am_i(void)
                return am_server ? "server" : "client";
        return am_sender ? "sender" : am_generator ? "generator" : "receiver";
  }
@@ -322,7 +322,7 @@ Modified from a patch that was written by Rolf Grossmann:
   -o, --owner                 preserve owner (super-user only)
   -g, --group                 preserve group
       --devices               preserve device files (super-user only)
-@@ -500,7 +501,9 @@ specified, in which case bf(-r) is not i
+@@ -502,7 +503,9 @@ specified, in which case bf(-r) is not i
  
  Note that bf(-a) bf(does not preserve hardlinks), because
  finding multiply-linked files is expensive.  You must separately
@@ -333,7 +333,7 @@ Modified from a patch that was written by Rolf Grossmann:
  
  dit(--no-OPTION) You may turn off one or more implied options by prefixing
  the option name with "no-".  Not all options may be prefixed with a "no-":
-@@ -795,6 +798,13 @@ quote(itemize(
+@@ -797,6 +800,13 @@ quote(itemize(
  
  If bf(--perms) is enabled, this option is ignored.
  
index 9690fab..03a0304 100644 (file)
@@ -367,15 +367,15 @@ the file's name.
 +#endif
 --- old/options.c
 +++ new/options.c
-@@ -144,6 +144,7 @@ char *backup_suffix = NULL;
+@@ -145,6 +145,7 @@ char *backup_suffix = NULL;
  char *tmpdir = NULL;
  char *partial_dir = NULL;
  char *basis_dir[MAX_BASIS_DIRS+1];
 +char *link_by_hash_dir = NULL;
  char *config_file = NULL;
  char *shell_cmd = NULL;
- char *log_format = NULL;
-@@ -337,6 +338,7 @@ void usage(enum logcode F)
+ char *logfile_name = NULL;
+@@ -347,6 +348,7 @@ void usage(enum logcode F)
    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");
@@ -383,7 +383,7 @@ the file's name.
    rprintf(F," -z, --compress              compress file data during the transfer\n");
    rprintf(F,"     --compress-level=NUM    explicitly set compression level\n");
    rprintf(F," -C, --cvs-exclude           auto-ignore files the same way CVS does\n");
-@@ -383,7 +385,7 @@ enum {OPT_VERSION = 1000, OPT_DAEMON, OP
+@@ -396,7 +398,7 @@ enum {OPT_VERSION = 1000, OPT_DAEMON, OP
        OPT_FILTER, OPT_COMPARE_DEST, OPT_COPY_DEST, OPT_LINK_DEST, OPT_HELP,
        OPT_INCLUDE, OPT_INCLUDE_FROM, OPT_MODIFY_WINDOW, OPT_MIN_SIZE, OPT_CHMOD,
        OPT_READ_BATCH, OPT_WRITE_BATCH, OPT_ONLY_WRITE_BATCH, OPT_MAX_SIZE,
@@ -392,7 +392,7 @@ the file's name.
        OPT_SERVER, OPT_REFUSED_BASE = 9000};
  
  static struct poptOption long_options[] = {
-@@ -477,6 +479,7 @@ static struct poptOption long_options[] 
+@@ -494,6 +496,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 },
@@ -400,7 +400,7 @@ the file's name.
    {"fuzzy",           'y', POPT_ARG_NONE,   &fuzzy_basis, 0, 0, 0 },
    {"compress",        'z', POPT_ARG_NONE,   0, 'z', 0, 0 },
    {"compress-level",   0,  POPT_ARG_INT,    &def_compress_level, 'z', 0, 0 },
-@@ -1062,6 +1065,21 @@ int parse_arguments(int *argc, const cha
+@@ -1083,6 +1086,21 @@ int parse_arguments(int *argc, const cha
                        usage(FINFO);
                        exit_cleanup(0);
  
@@ -422,7 +422,7 @@ the file's name.
                default:
                        /* A large opt value means that set_refuse_options()
                         * turned this option off. */
-@@ -1710,6 +1728,11 @@ void server_options(char **args,int *arg
+@@ -1737,6 +1755,11 @@ void server_options(char **args,int *arg
                }
        }
  
@@ -436,15 +436,15 @@ the file's name.
                        args[ac++] = "--files-from";
 --- old/receiver.c
 +++ new/receiver.c
-@@ -53,6 +53,7 @@ extern int delay_updates;
+@@ -50,6 +50,7 @@ extern int delay_updates;
  extern struct stats stats;
- extern char *log_format;
+ extern char *stdout_format;
  extern char *tmpdir;
 +extern char *link_by_hash_dir;
  extern char *partial_dir;
  extern char *basis_dir[];
  extern struct file_list *the_file_list;
-@@ -124,12 +125,13 @@ static int get_tmpname(char *fnametmp, c
+@@ -121,12 +122,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,
@@ -459,7 +459,7 @@ the file's name.
        int32 len;
        OFF_T offset = 0;
        OFF_T offset2;
-@@ -149,6 +151,9 @@ static int receive_data(int f_in, char *
+@@ -146,6 +148,9 @@ static int receive_data(int f_in, char *
        } else
                mapbuf = NULL;
  
@@ -469,7 +469,7 @@ the file's name.
        sum_init(checksum_seed);
  
        if (append_mode) {
-@@ -191,6 +196,8 @@ static int receive_data(int f_in, char *
+@@ -188,6 +193,8 @@ static int receive_data(int f_in, char *
                        cleanup_got_literal = 1;
  
                        sum_update(data, i);
@@ -478,7 +478,7 @@ the file's name.
  
                        if (fd != -1 && write_file(fd,data,i) != i)
                                goto report_write_error;
-@@ -217,6 +224,8 @@ static int receive_data(int f_in, char *
+@@ -214,6 +221,8 @@ static int receive_data(int f_in, char *
  
                        see_token(map, len);
                        sum_update(map, len);
@@ -487,7 +487,7 @@ the file's name.
                }
  
                if (inplace) {
-@@ -257,6 +266,8 @@ static int receive_data(int f_in, char *
+@@ -256,6 +265,8 @@ static int receive_data(int f_in, char *
        }
  
        sum_end(file_sum1);
@@ -496,7 +496,7 @@ the file's name.
  
        if (mapbuf)
                unmap_file(mapbuf);
-@@ -272,7 +283,7 @@ static int receive_data(int f_in, char *
+@@ -271,7 +282,7 @@ static int receive_data(int f_in, char *
  
  static void discard_receive_data(int f_in, OFF_T length)
  {
@@ -505,7 +505,7 @@ the file's name.
  }
  
  static void handle_delayed_updates(struct file_list *flist, char *local_name)
-@@ -604,8 +615,12 @@ int recv_files(int f_in, struct file_lis
+@@ -601,8 +612,12 @@ int recv_files(int f_in, struct file_lis
                        rprintf(FINFO, "%s\n", fname);
  
                /* recv file data */
@@ -517,11 +517,11 @@ the file's name.
 -                                     fname, fd2, file->length);
 +                                     fname, fd2, file->length, file->u.sum);
  
-               if (!log_before_transfer)
-                       log_item(file, &initial_stats, iflags, NULL);
+               log_item(log_code, file, &initial_stats, iflags, NULL);
 --- old/rsync.c
 +++ new/rsync.c
-@@ -49,6 +49,7 @@ extern int inplace;
+@@ -48,6 +48,7 @@ extern int inplace;
  extern int keep_dirlinks;
  extern int make_backups;
  extern mode_t orig_umask;
@@ -529,7 +529,7 @@ the file's name.
  extern struct stats stats;
  extern struct chmod_mode_struct *daemon_chmod_modes;
  
-@@ -269,8 +270,15 @@ void finish_transfer(char *fname, char *
+@@ -266,8 +267,15 @@ void finish_transfer(char *fname, char *
        /* move tmp file over real file */
        if (verbose > 2)
                rprintf(FINFO, "renaming %s to %s\n", fnametmp, fname);
@@ -549,7 +549,7 @@ the file's name.
                        ret == -2 ? "copy" : "rename",
 --- old/rsync.h
 +++ new/rsync.h
-@@ -640,6 +640,14 @@ struct stats {
+@@ -644,6 +644,14 @@ struct stats {
        int current_file_index;
  };
  
@@ -566,7 +566,7 @@ the file's name.
  #include "byteorder.h"
 --- old/rsync.yo
 +++ new/rsync.yo
-@@ -363,6 +363,7 @@ to the detailed description below for a 
+@@ -365,6 +365,7 @@ to the detailed description below for a 
       --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
index 9f212bb..bd35628 100644 (file)
@@ -360,7 +360,7 @@ TODO:
  
        /* Note that this field may not have type ino_t.  It depends
         * on the complicated interaction between largefile feature
-@@ -284,7 +288,7 @@ void usage(enum logcode F)
+@@ -288,7 +292,7 @@ void usage(enum logcode F)
    rprintf(F," -v, --verbose               increase verbosity\n");
    rprintf(F," -q, --quiet                 suppress non-error messages\n");
    rprintf(F," -c, --checksum              skip based on checksum, not mod-time & size\n");
@@ -369,7 +369,7 @@ TODO:
    rprintf(F,"     --no-OPTION             turn off an implied OPTION (e.g. --no-D)\n");
    rprintf(F," -r, --recursive             recurse into directories\n");
    rprintf(F," -R, --relative              use relative path names\n");
-@@ -308,6 +312,9 @@ void usage(enum logcode F)
+@@ -312,6 +316,9 @@ void usage(enum logcode F)
  #ifdef SUPPORT_ACLS
    rprintf(F," -A, --acls                  preserve ACLs (implies --perms)\n");
  #endif
@@ -379,7 +379,7 @@ TODO:
    rprintf(F,"     --chmod=CHMOD           change destination permissions\n");
    rprintf(F," -o, --owner                 preserve owner (super-user only)\n");
    rprintf(F," -g, --group                 preserve group\n");
-@@ -428,6 +435,9 @@ static struct poptOption long_options[] 
+@@ -433,6 +440,9 @@ static struct poptOption long_options[] 
    {"acls",            'A', POPT_ARG_NONE,   0, 'A', 0, 0 },
    {"no-acls",          0,  POPT_ARG_VAL,    &preserve_acls, 0, 0, 0 },
    {"no-A",             0,  POPT_ARG_VAL,    &preserve_acls, 0, 0, 0 },
@@ -389,7 +389,7 @@ TODO:
    {"times",           't', POPT_ARG_VAL,    &preserve_times, 1, 0, 0 },
    {"no-times",         0,  POPT_ARG_VAL,    &preserve_times, 0, 0, 0 },
    {"no-t",             0,  POPT_ARG_VAL,    &preserve_times, 0, 0, 0 },
-@@ -1105,6 +1115,17 @@ int parse_arguments(int *argc, const cha
+@@ -1112,6 +1122,17 @@ int parse_arguments(int *argc, const cha
                        return 0;
  #endif
  
@@ -407,7 +407,7 @@ TODO:
  
                default:
                        /* A large opt value means that set_refuse_options()
-@@ -1555,6 +1576,10 @@ void server_options(char **args,int *arg
+@@ -1562,6 +1583,10 @@ void server_options(char **args,int *arg
        if (preserve_acls)
                argstr[x++] = 'A';
  #endif
@@ -420,15 +420,15 @@ TODO:
        if (preserve_gid)
 --- old/rsync.c
 +++ new/rsync.c
-@@ -34,6 +34,7 @@ extern int verbose;
+@@ -33,6 +33,7 @@
+ extern int verbose;
  extern int dry_run;
- extern int logfile_format_has_i;
  extern int preserve_acls;
 +extern int preserve_xattrs;
  extern int preserve_perms;
  extern int preserve_executability;
  extern int preserve_times;
-@@ -223,6 +224,10 @@ int set_file_attrs(char *fname, struct f
+@@ -222,6 +223,10 @@ int set_file_attrs(char *fname, struct f
        if (preserve_acls && set_acl(fname, file, sxp) == 0)
                updated = 1;
  #endif