Fixed failing hunks.
authorWayne Davison <wayned@samba.org>
Sat, 27 Jan 2007 15:01:01 +0000 (15:01 +0000)
committerWayne Davison <wayned@samba.org>
Sat, 27 Jan 2007 15:01:01 +0000 (15:01 +0000)
acls.diff
detect-renamed.diff
early-checksum.diff
link-by-hash.diff
source-filter_dest-filter.diff

index 678a5d6..1fc6ccc 100644 (file)
--- a/acls.diff
+++ b/acls.diff
@@ -1804,7 +1804,7 @@ latest ACL-enabling patch to send files to an older ACL-enabled rsync.
                if (real_ret != 0 && one_file_system)
 -                      real_st.st_dev = filesystem_dev;
 +                      real_sx.st.st_dev = filesystem_dev;
-               if (incremental) {
+               if (inc_recurse) {
                        if (one_file_system) {
                                uint32 *devp = F_DIRDEV_P(file);
 -                              DEV_MAJOR(devp) = major(real_st.st_dev);
@@ -2252,7 +2252,7 @@ latest ACL-enabling patch to send files to an older ACL-enabled rsync.
 +      dflt_perms = (ACCESSPERMS & ~orig_umask);
 +
        do {
-               if (incremental && delete_during && cur_flist->ndx_start) {
+               if (inc_recurse && delete_during && cur_flist->ndx_start) {
                        struct file_struct *fp = dir_flist->files[cur_flist->parent_ndx];
 --- old/hlink.c
 +++ new/hlink.c
@@ -5840,9 +5840,9 @@ latest ACL-enabling patch to send files to an older ACL-enabled rsync.
  extern int delay_updates;
 +extern mode_t orig_umask;
  extern struct stats stats;
- extern char *stdout_format;
  extern char *tmpdir;
-@@ -349,6 +350,10 @@ int recv_files(int f_in, char *local_nam
+ extern char *partial_dir;
+@@ -348,6 +349,10 @@ int recv_files(int f_in, char *local_nam
        int itemizing = am_server ? logfile_format_has_i : stdout_format_has_i;
        enum logcode log_code = log_before_transfer ? FLOG : FINFO;
        int max_phase = protocol_version >= 29 ? 2 : 1;
@@ -5853,7 +5853,7 @@ latest ACL-enabling patch to send files to an older ACL-enabled rsync.
        int ndx, recv_ok;
  
        if (verbose > 2)
-@@ -562,7 +567,16 @@ int recv_files(int f_in, char *local_nam
+@@ -563,7 +568,16 @@ int recv_files(int f_in, char *local_nam
                 * mode based on the local permissions and some heuristics. */
                if (!preserve_perms) {
                        int exists = fd1 != -1;
@@ -5886,10 +5886,10 @@ latest ACL-enabling patch to send files to an older ACL-enabled rsync.
  extern int keep_dirlinks;
  extern int make_backups;
 -extern mode_t orig_umask;
- extern struct stats stats;
  extern struct file_list *cur_flist, *first_flist, *dir_flist;
  extern struct chmod_mode_struct *daemon_chmod_modes;
-@@ -203,7 +203,8 @@ void free_sums(struct sum_struct *s)
+@@ -202,7 +202,8 @@ void free_sums(struct sum_struct *s)
  
  /* This is only called when we aren't preserving permissions.  Figure out what
   * the permissions should be and return them merged back into the mode. */
@@ -5899,7 +5899,7 @@ latest ACL-enabling patch to send files to an older ACL-enabled rsync.
  {
        int new_mode;
        /* If the file already exists, we'll return the local permissions,
-@@ -220,56 +221,65 @@ mode_t dest_mode(mode_t flist_mode, mode
+@@ -219,56 +220,65 @@ mode_t dest_mode(mode_t flist_mode, mode
                                new_mode |= (new_mode & 0444) >> 2;
                }
        } else {
@@ -5980,7 +5980,7 @@ latest ACL-enabling patch to send files to an older ACL-enabled rsync.
                ;
        else
  #endif
-@@ -279,45 +289,57 @@ int set_file_attrs(char *fname, struct f
+@@ -278,45 +288,57 @@ int set_file_attrs(char *fname, struct f
                                rprintf(FINFO,
                                        "set uid of %s from %ld to %ld\n",
                                        fname,
@@ -6048,7 +6048,7 @@ latest ACL-enabling patch to send files to an older ACL-enabled rsync.
                }
                if (ret == 0) /* ret == 1 if symlink could not be set */
                        updated = 1;
-@@ -330,6 +352,11 @@ int set_file_attrs(char *fname, struct f
+@@ -329,6 +351,11 @@ int set_file_attrs(char *fname, struct f
                else
                        rprintf(FCLIENT, "%s is uptodate\n", fname);
        }
@@ -6193,7 +6193,7 @@ latest ACL-enabling patch to send files to an older ACL-enabled rsync.
  dit(bf(--chmod)) This option tells rsync to apply one or more
  comma-separated "chmod" strings to the permission of the files in the
  transfer.  The resulting value is treated as though it was the permissions
-@@ -1426,8 +1439,8 @@ if the receiving rsync is at least versi
+@@ -1432,8 +1445,8 @@ if the receiving rsync is at least versi
  with older versions of rsync, but that also turns on the output of other
  verbose messages).
  
@@ -6204,7 +6204,7 @@ latest ACL-enabling patch to send files to an older ACL-enabled rsync.
  type of update being done, bf(X) is replaced by the file-type, and the
  other letters represent attributes that may be output if they are being
  modified.
-@@ -1476,7 +1489,11 @@ quote(itemization(
+@@ -1482,7 +1495,11 @@ quote(itemization(
    sender's value (requires bf(--owner) and super-user privileges).
    it() A bf(g) means the group is different and is being updated to the
    sender's value (requires bf(--group) and the authority to set the group).
index 984694e..749565d 100644 (file)
@@ -97,7 +97,7 @@ TODO:
  static void send_directory(int f, struct file_list *flist, int ndx,
                           char *fbuf, int len, int flags);
  
-@@ -1702,6 +1744,25 @@ struct file_list *recv_file_list(int f)
+@@ -1706,6 +1748,25 @@ struct file_list *recv_file_list(int f)
  
        clean_flist(flist, relative_paths, 1);
  
@@ -120,7 +120,7 @@ TODO:
 +              the_fattr_list.high = j;
 +      }
 +
-       if (incremental) {
+       if (inc_recurse) {
                qsort(dir_flist->files + dstart, dir_flist->count - dstart,
                      sizeof dir_flist->files[0], (int (*)())file_compare);
 --- old/generator.c
@@ -460,7 +460,7 @@ TODO:
                rsyserr(FERROR, stat_errno, "recv_generator: failed to stat %s",
                        full_fname(fname));
                return;
-@@ -1683,6 +1838,12 @@ void generate_files(int f_out, char *loc
+@@ -1717,6 +1872,12 @@ void generate_files(int f_out, char *loc
        if (verbose > 2)
                rprintf(FINFO, "generator starting pid=%ld\n", (long)getpid());
  
@@ -473,7 +473,7 @@ TODO:
        if (delete_before && !local_name && cur_flist->count > 0)
                do_delete_pass(cur_flist);
        if (delete_during == 2) {
-@@ -1693,7 +1854,7 @@ void generate_files(int f_out, char *loc
+@@ -1727,7 +1888,7 @@ void generate_files(int f_out, char *loc
        }
        do_progress = 0;
  
@@ -482,7 +482,7 @@ TODO:
                whole_file = 0;
        if (verbose >= 2) {
                rprintf(FINFO, "delta-transmission %s\n",
-@@ -1718,7 +1879,7 @@ void generate_files(int f_out, char *loc
+@@ -1752,7 +1913,7 @@ void generate_files(int f_out, char *loc
                                        dirdev = MAKEDEV(DEV_MAJOR(devp), DEV_MINOR(devp));
                                } else
                                        dirdev = MAKEDEV(0, 0);
@@ -491,9 +491,9 @@ TODO:
                        }
                }
                for (i = cur_flist->low; i <= cur_flist->high; i++) {
-@@ -1764,7 +1925,21 @@ void generate_files(int f_out, char *loc
+@@ -1798,7 +1959,21 @@ void generate_files(int f_out, char *loc
  
-               if (!incremental) {
+               if (!inc_recurse) {
                        if (delete_during)
 -                              delete_in_dir(NULL, NULL, NULL, &dev_zero);
 +                              delete_in_dir(NULL, NULL, NULL, &dev_zero, 0);
@@ -576,7 +576,7 @@ TODO:
       --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
-@@ -1272,6 +1273,15 @@ Note that the use of the bf(--delete) op
+@@ -1296,6 +1297,15 @@ Note that the use of the bf(--delete) op
  fuzzy-match files, so either use bf(--delete-after) or specify some
  filename exclusions if you need to prevent this.
  
index eb2c0ef..3fcbae6 100644 (file)
@@ -17,14 +17,14 @@ To use this patch, run these commands for a successful build:
 --- old/flist.c
 +++ new/flist.c
 @@ -33,6 +33,7 @@ extern int am_sender;
- extern int incremental;
+ extern int inc_recurse;
  extern int do_progress;
  extern int always_checksum;
 +extern int pre_checksum;
  extern int module_id;
  extern int ignore_errors;
  extern int numeric_ids;
-@@ -847,6 +848,15 @@ static struct file_struct *recv_file_ent
+@@ -850,6 +851,15 @@ static struct file_struct *recv_file_ent
                        memcpy(bp, F_SUM(first), checksum_len);
                } else
                        read_buf(f, bp, checksum_len);
@@ -39,7 +39,7 @@ To use this patch, run these commands for a successful build:
 +              }
        }
  
-       return file;
+       if (S_ISREG(mode) || S_ISLNK(mode))
 --- old/generator.c
 +++ new/generator.c
 @@ -73,6 +73,7 @@ extern int protocol_version;
@@ -118,7 +118,7 @@ To use this patch, run these commands for a successful build:
  int local_server = 0;
  int new_root_dir = 0;
  mode_t orig_umask = 0;
-@@ -792,6 +796,7 @@ static void do_server_recv(int f_in, int
+@@ -793,6 +797,7 @@ static void do_server_recv(int f_in, int
        struct file_list *flist;
        char *local_name = NULL;
        char *dir = NULL;
@@ -126,7 +126,7 @@ To use this patch, run these commands for a successful build:
        int save_verbose = verbose;
  
        if (filesfrom_fd >= 0) {
-@@ -838,6 +843,10 @@ static void do_server_recv(int f_in, int
+@@ -839,6 +844,10 @@ static void do_server_recv(int f_in, int
                filesfrom_fd = -1;
        }
  
@@ -137,7 +137,7 @@ To use this patch, run these commands for a successful build:
        flist = recv_file_list(f_in);
        if (!flist) {
                rprintf(FERROR,"server_recv: recv_file_list error\n");
-@@ -847,6 +856,9 @@ static void do_server_recv(int f_in, int
+@@ -848,6 +857,9 @@ static void do_server_recv(int f_in, int
                recv_additional_file_list(f_in);
        verbose = save_verbose;
  
@@ -147,7 +147,7 @@ To use this patch, run these commands for a successful build:
        if (argc > 0)
                local_name = get_local_name(flist,argv[0]);
  
-@@ -926,6 +938,7 @@ int client_run(int f_in, int f_out, pid_
+@@ -927,6 +939,7 @@ int client_run(int f_in, int f_out, pid_
  {
        struct file_list *flist = NULL;
        int exit_code = 0, exit_code2 = 0;
@@ -155,7 +155,7 @@ To use this patch, run these commands for a successful build:
        char *local_name = NULL;
  
        cleanup_child_pid = pid;
-@@ -1006,12 +1019,19 @@ int client_run(int f_in, int f_out, pid_
+@@ -1007,12 +1020,19 @@ int client_run(int f_in, int f_out, pid_
                filesfrom_fd = -1;
        }
  
@@ -166,7 +166,7 @@ To use this patch, run these commands for a successful build:
        if (write_batch && !am_server)
                start_write_batch(f_in);
        flist = recv_file_list(f_in);
-       if (incremental && file_total == 1)
+       if (inc_recurse && file_total == 1)
                recv_additional_file_list(f_in);
  
 +      if (pre_checksum)
index 59d4573..4a1cc5c 100644 (file)
@@ -33,7 +33,7 @@ To use this patch, run these commands for a successful build:
  
  extern char curr_dir[MAXPATHLEN];
  
-@@ -712,7 +713,7 @@ static struct file_struct *recv_file_ent
+@@ -715,7 +716,7 @@ static struct file_struct *recv_file_ent
        }
  #endif
  
@@ -452,7 +452,7 @@ To use this patch, run these commands for a successful build:
                        args[ac++] = "--files-from";
 --- old/receiver.c
 +++ new/receiver.c
-@@ -124,12 +124,14 @@ int get_tmpname(char *fnametmp, char *fn
+@@ -123,12 +123,14 @@ int get_tmpname(char *fnametmp, char *fn
  
  
  static int receive_data(int f_in, char *fname_r, int fd_r, OFF_T size_r,
@@ -468,7 +468,7 @@ To use this patch, run these commands for a successful build:
        int32 len;
        OFF_T offset = 0;
        OFF_T offset2;
-@@ -149,6 +151,9 @@ static int receive_data(int f_in, char *
+@@ -148,6 +150,9 @@ static int receive_data(int f_in, char *
        } else
                mapbuf = NULL;
  
@@ -478,7 +478,7 @@ To use this patch, run these commands for a successful build:
        sum_init(checksum_seed);
  
        if (append_mode > 0) {
-@@ -191,6 +196,8 @@ static int receive_data(int f_in, char *
+@@ -190,6 +195,8 @@ static int receive_data(int f_in, char *
                        cleanup_got_literal = 1;
  
                        sum_update(data, i);
@@ -487,7 +487,7 @@ To use this patch, run these commands for a successful build:
  
                        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 *
+@@ -216,6 +223,8 @@ static int receive_data(int f_in, char *
  
                        see_token(map, len);
                        sum_update(map, len);
@@ -496,7 +496,7 @@ To use this patch, run these commands for a successful build:
                }
  
                if (updating_basis) {
-@@ -259,6 +268,8 @@ static int receive_data(int f_in, char *
+@@ -258,6 +267,8 @@ static int receive_data(int f_in, char *
        }
  
        sum_end(file_sum1);
@@ -505,7 +505,7 @@ To use this patch, run these commands for a successful build:
  
        if (mapbuf)
                unmap_file(mapbuf);
-@@ -274,7 +285,7 @@ static int receive_data(int f_in, char *
+@@ -273,7 +284,7 @@ static int receive_data(int f_in, char *
  
  static void discard_receive_data(int f_in, OFF_T length)
  {
@@ -514,7 +514,7 @@ To use this patch, run these commands for a successful build:
  }
  
  static void handle_delayed_updates(char *local_name)
-@@ -621,7 +632,7 @@ int recv_files(int f_in, char *local_nam
+@@ -622,7 +633,7 @@ int recv_files(int f_in, char *local_nam
  
                /* recv file data */
                recv_ok = receive_data(f_in, fnamecmp, fd1, st.st_size,
@@ -530,10 +530,10 @@ To use this patch, run these commands for a successful build:
  extern int make_backups;
  extern mode_t orig_umask;
 +extern char *link_by_hash_dir;
- extern struct stats stats;
  extern struct file_list *cur_flist, *first_flist, *dir_flist;
  extern struct chmod_mode_struct *daemon_chmod_modes;
-@@ -374,8 +375,15 @@ void finish_transfer(char *fname, char *
+@@ -373,8 +374,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);
index 5f53c69..b89ebbb 100644 (file)
@@ -238,15 +238,15 @@ To use this patch, run these commands for a successful build:
 +}
 --- old/receiver.c
 +++ new/receiver.c
-@@ -49,6 +49,7 @@ extern int checksum_seed;
- extern int inplace;
- extern int delay_updates;
- extern struct stats stats;
-+extern char *dest_filter;
- extern char *stdout_format;
+@@ -52,6 +52,7 @@ extern struct stats stats;
  extern char *tmpdir;
  extern char *partial_dir;
-@@ -350,6 +351,8 @@ int recv_files(int f_in, char *local_nam
+ extern char *basis_dir[];
++extern char *dest_filter;
+ extern struct file_list *cur_flist, *first_flist;
+ extern struct filter_list_struct server_filter_list;
+@@ -349,6 +350,8 @@ int recv_files(int f_in, char *local_nam
        enum logcode log_code = log_before_transfer ? FLOG : FINFO;
        int max_phase = protocol_version >= 29 ? 2 : 1;
        int ndx, recv_ok;
@@ -255,7 +255,7 @@ To use this patch, run these commands for a successful build:
  
        if (verbose > 2)
                rprintf(FINFO, "recv_files(%d) starting\n", cur_flist->count);
-@@ -359,6 +362,23 @@ int recv_files(int f_in, char *local_nam
+@@ -358,6 +361,23 @@ int recv_files(int f_in, char *local_nam
  
        updating_basis = inplace;
  
@@ -279,7 +279,7 @@ To use this patch, run these commands for a successful build:
        while (1) {
                cleanup_disable();
  
-@@ -619,6 +639,9 @@ int recv_files(int f_in, char *local_nam
+@@ -620,6 +640,9 @@ int recv_files(int f_in, char *local_nam
                else if (!am_server && verbose && do_progress)
                        rprintf(FINFO, "%s\n", fname);
  
@@ -289,7 +289,7 @@ To use this patch, run these commands for a successful build:
                /* recv file data */
                recv_ok = receive_data(f_in, fnamecmp, fd1, st.st_size,
                                       fname, fd2, F_LENGTH(file));
-@@ -633,6 +656,16 @@ int recv_files(int f_in, char *local_nam
+@@ -634,6 +657,16 @@ int recv_files(int f_in, char *local_nam
                        exit_cleanup(RERR_FILEIO);
                }
  
@@ -335,7 +335,7 @@ To use this patch, run these commands for a successful build:
       --protocol=NUM          force an older protocol version to be used
       --checksum-seed=NUM     set block/file checksum seed (advanced)
   -4, --ipv4                  prefer IPv4
-@@ -1774,6 +1777,33 @@ file previously generated by bf(--write-
+@@ -1804,6 +1807,33 @@ file previously generated by bf(--write-
  If em(FILE) is bf(-), the batch data will be read from standard input.
  See the "BATCH MODE" section for details.
  
@@ -371,15 +371,15 @@ To use this patch, run these commands for a successful build:
  version of rsync.  For instance, if rsync 2.6.4 is being used with the
 --- old/sender.c
 +++ new/sender.c
-@@ -44,6 +44,7 @@ extern int batch_fd;
+@@ -42,6 +42,7 @@ extern int do_progress;
+ extern int inplace;
+ extern int batch_fd;
  extern int write_batch;
++extern char *source_filter;
  extern struct stats stats;
  extern struct file_list *cur_flist, *first_flist;
-+extern char *source_filter;
- extern char *stdout_format;
  
- /**
-@@ -176,6 +177,26 @@ void send_files(int f_in, int f_out)
+@@ -175,6 +176,26 @@ void send_files(int f_in, int f_out)
        enum logcode log_code = log_before_transfer ? FLOG : FINFO;
        int f_xfer = write_batch < 0 ? batch_fd : f_out;
        int ndx, j;
@@ -406,7 +406,7 @@ To use this patch, run these commands for a successful build:
  
        if (verbose > 2)
                rprintf(FINFO, "send_files starting\n");
-@@ -266,6 +287,7 @@ void send_files(int f_in, int f_out)
+@@ -265,6 +286,7 @@ void send_files(int f_in, int f_out)
                        exit_cleanup(RERR_PROTOCOL);
                }
  
@@ -414,7 +414,7 @@ To use this patch, run these commands for a successful build:
                fd = do_open(fname, O_RDONLY, 0);
                if (fd == -1) {
                        if (errno == ENOENT) {
-@@ -296,6 +318,33 @@ void send_files(int f_in, int f_out)
+@@ -295,6 +317,33 @@ void send_files(int f_in, int f_out)
                        exit_cleanup(RERR_PROTOCOL);
                }
  
@@ -448,7 +448,7 @@ To use this patch, run these commands for a successful build:
                if (st.st_size) {
                        int32 read_size = MAX(s->blength * 3, MAX_MAP_SIZE);
                        mbuf = map_file(fd, st.st_size, read_size, s->blength);
-@@ -337,6 +386,8 @@ void send_files(int f_in, int f_out)
+@@ -336,6 +385,8 @@ void send_files(int f_in, int f_out)
                        }
                }
                close(fd);