Fixed failed hunks.
authorWayne Davison <wayned@samba.org>
Thu, 13 May 2004 19:18:55 +0000 (19:18 +0000)
committerWayne Davison <wayned@samba.org>
Thu, 13 May 2004 19:18:55 +0000 (19:18 +0000)
dir-times.diff
early-chmod.diff
fsync.diff
fuzzy.diff
inplace.diff

index dbf3891..7b296d5 100644 (file)
@@ -1,5 +1,5 @@
 --- options.c  6 May 2004 21:08:01 -0000       1.148
-+++ options.c  13 May 2004 07:11:12 -0000
++++ options.c  13 May 2004 18:59:46 -0000
 @@ -46,6 +46,7 @@ int preserve_devices = 0;
  int preserve_uid = 0;
  int preserve_gid = 0;
        if (preserve_perms)
                argstr[x++] = 'p';
        if (recurse)
---- rsync.c    13 May 2004 07:08:25 -0000      1.136
-+++ rsync.c    13 May 2004 07:11:13 -0000
-@@ -141,14 +141,16 @@ int set_perms(char *fname,struct file_st
+--- rsync.c    13 May 2004 18:51:22 -0000      1.138
++++ rsync.c    13 May 2004 18:59:47 -0000
+@@ -25,6 +25,7 @@
+ extern int verbose;
+ extern int dry_run;
+ extern int preserve_times;
++extern int preserve_dir_times;
+ extern int am_root;
+ extern int am_sender;
+ extern int am_generator;
+@@ -138,14 +139,16 @@ int set_perms(char *fname,struct file_st
                st = &st2;
        }
  
 -      if (!preserve_times || S_ISLNK(st->st_mode))
--              flags |= PERMS_SKIP_TIME;
+-              flags |= PERMS_SKIP_MTIME;
 +      if (S_ISDIR(st->st_mode)) {
 +              if (!preserve_dir_times)
-+                      flags |= PERMS_SKIP_TIME;
++                      flags |= PERMS_SKIP_MTIME;
 +      } else {
 +              if (!preserve_times || S_ISLNK(st->st_mode))
-+                      flags |= PERMS_SKIP_TIME;
++                      flags |= PERMS_SKIP_MTIME;
 +      }
-       if (!(flags & PERMS_SKIP_TIME)
+       if (!(flags & PERMS_SKIP_MTIME)
            && cmp_modtime(st->st_mtime, file->modtime) != 0) {
 -              /* don't complain about not setting times on directories
 -               * because some filesystems can't do it */
@@ -61,7 +69,7 @@
                                full_fname(fname), strerror(errno));
                        return 0;
 --- rsync.yo   7 May 2004 00:18:37 -0000       1.169
-+++ rsync.yo   13 May 2004 07:11:14 -0000
++++ rsync.yo   13 May 2004 18:59:47 -0000
 @@ -298,7 +298,8 @@ verb(
   -o, --owner                 preserve owner (root only)
   -g, --group                 preserve group
  dit(bf(-n, --dry-run)) This tells rsync to not do any file transfers,
  instead it will just report the actions it would have taken.
 --- testsuite/chgrp.test       5 Feb 2004 01:37:08 -0000       1.10
-+++ testsuite/chgrp.test       13 May 2004 07:11:15 -0000
++++ testsuite/chgrp.test       13 May 2004 18:59:47 -0000
 @@ -29,7 +29,7 @@ do
  done
  sleep 2
  # The script would have aborted on error, so getting here means we've won.
  exit 0
 --- testsuite/chown.test       4 Feb 2004 18:24:41 -0000       1.4
-+++ testsuite/chown.test       13 May 2004 07:11:15 -0000
++++ testsuite/chown.test       13 May 2004 18:59:47 -0000
 @@ -31,7 +31,7 @@ chown 5001 "$name2" || test_skipped "Can
  chgrp 5002 "$name1" || test_skipped "Can't chgrp (probably need root)"
  chgrp 5003 "$name2" || test_skipped "Can't chgrp (probably need root)"
  # The script would have aborted on error, so getting here means we've won.
  exit 0
 --- testsuite/daemon-gzip-download.test        4 Feb 2004 18:24:41 -0000       1.6
-+++ testsuite/daemon-gzip-download.test        13 May 2004 07:11:15 -0000
++++ testsuite/daemon-gzip-download.test        13 May 2004 18:59:47 -0000
 @@ -27,7 +27,7 @@ RSYNC_CONNECT_PROG="$RSYNC --config=$con
  export RSYNC_CONNECT_PROG
  
  # The script would have aborted on error, so getting here means we've won.
  exit 0
 --- testsuite/daemon-gzip-upload.test  4 Feb 2004 18:24:41 -0000       1.6
-+++ testsuite/daemon-gzip-upload.test  13 May 2004 07:11:15 -0000
++++ testsuite/daemon-gzip-upload.test  13 May 2004 18:59:47 -0000
 @@ -21,7 +21,7 @@ RSYNC_CONNECT_PROG="$RSYNC --config=$con
  export RSYNC_CONNECT_PROG
  
  # The script would have aborted on error, so getting here means we've won.
  exit 0
 --- testsuite/devices.test     9 Apr 2004 00:36:45 -0000       1.7
-+++ testsuite/devices.test     13 May 2004 07:11:15 -0000
++++ testsuite/devices.test     13 May 2004 18:59:47 -0000
 @@ -32,7 +32,7 @@ mknod "$fromdir/block" b 42 69 || test_s
  mknod "$fromdir/block2" b 42 73 || test_skipped "Can't create block device node unless root"
  mknod "$fromdir/block3" b 105 73 || test_skipped "Can't create block device node unless root"
  # The script would have aborted on error, so getting here means we've won.
  exit 0
 --- testsuite/duplicates.test  4 Feb 2004 18:24:41 -0000       1.9
-+++ testsuite/duplicates.test  13 May 2004 07:11:15 -0000
++++ testsuite/duplicates.test  13 May 2004 18:59:47 -0000
 @@ -36,7 +36,7 @@ ln -s "$name1" "$name2" || fail "can't c
  
  outfile="$scratchdir/rsync.out"
  
  # Make sure each file was only copied once...
 --- testsuite/exclude.test     14 Apr 2004 20:50:32 -0000      1.5
-+++ testsuite/exclude.test     13 May 2004 07:11:15 -0000
++++ testsuite/exclude.test     13 May 2004 18:59:47 -0000
 @@ -67,7 +67,7 @@ EOF
  
  # Create the chk dir with what we expect to be excluded
  
  # The script would have aborted on error, so getting here means we've won.
 --- testsuite/hands.test       4 Feb 2004 18:24:41 -0000       1.12
-+++ testsuite/hands.test       13 May 2004 07:11:15 -0000
++++ testsuite/hands.test       13 May 2004 18:59:47 -0000
 @@ -11,19 +11,19 @@ hands_setup
  
  # Main script starts here
  # The script would have aborted on error, so getting here means we've won.
  exit 0
 --- testsuite/hardlinks.test   4 Feb 2004 18:24:41 -0000       1.4
-+++ testsuite/hardlinks.test   13 May 2004 07:11:15 -0000
++++ testsuite/hardlinks.test   13 May 2004 18:59:47 -0000
 @@ -31,7 +31,7 @@ ln "$name1" "$name2" || fail "Can't crea
  ln "$name2" "$name3" || fail "Can't create hardlink"
  cp "$name2" "$name4" || fail "Can't copy file"
  # The script would have aborted on error, so getting here means we've won.
  exit 0
 --- testsuite/longdir.test     4 Feb 2004 18:24:41 -0000       1.9
-+++ testsuite/longdir.test     13 May 2004 07:11:15 -0000
++++ testsuite/longdir.test     13 May 2004 18:59:47 -0000
 @@ -18,7 +18,7 @@ makepath $LONGDIR || test_skipped "unabl
  touch $LONGDIR/1 || test_skipped "unable to create files in long directory"
  date > ${LONGDIR}/1
  # The script would have aborted on error, so getting here means we've won.
  exit 0
 --- testsuite/merge.test       30 Apr 2004 17:24:49 -0000      1.5
-+++ testsuite/merge.test       13 May 2004 07:11:15 -0000
++++ testsuite/merge.test       13 May 2004 18:59:47 -0000
 @@ -43,9 +43,9 @@ cp -p "$from2dir"/sub1/uno "$from3dir"/s
  cp -p "$from3dir"/sub2/subby "$chkdir"/sub2
  
  # The script would have aborted on error, so getting here means we've won.
  exit 0
 --- testsuite/ssh-basic.test   19 Feb 2003 16:22:50 -0000      1.6
-+++ testsuite/ssh-basic.test   13 May 2004 07:11:15 -0000
++++ testsuite/ssh-basic.test   13 May 2004 18:59:47 -0000
 @@ -28,7 +28,7 @@ fi
  # nothing to do.
  hands_setup
 -runtest "ssh: renamed file" 'checkit "$RSYNC --delete -avH -e ssh --rsync-path=$RSYNC ${FROM}/ localhost:${TO}" ${FROM}/ ${TO}'
 +runtest "ssh: renamed file" 'checkit "$RSYNC --delete -advH -e ssh --rsync-path=$RSYNC ${FROM}/ localhost:${TO}" ${FROM}/ ${TO}'
 --- testsuite/unsafe-links.test        15 Jan 2003 16:14:07 -0000      1.6
-+++ testsuite/unsafe-links.test        13 May 2004 07:11:15 -0000
++++ testsuite/unsafe-links.test        13 May 2004 18:59:47 -0000
 @@ -35,33 +35,33 @@ ln -s ../../unsafe/unsafefile "from/safe
  set -x
  
index b012f66..30f023f 100644 (file)
@@ -1,6 +1,6 @@
---- rsync.c    23 Mar 2004 16:16:15 -0000      1.135
-+++ rsync.c    29 Apr 2004 19:49:59 -0000
-@@ -235,6 +235,9 @@ void finish_transfer(char *fname, char *
+--- rsync.c    13 May 2004 18:51:22 -0000      1.138
++++ rsync.c    13 May 2004 19:01:10 -0000
+@@ -236,6 +236,9 @@ void finish_transfer(char *fname, char *
        if (make_backups && !make_backup(fname))
                return;
  
        /* move tmp file over real file */
        ret = robust_rename(fnametmp, fname, file->mode & INITACCESSPERMS);
        if (ret < 0) {
-@@ -242,8 +245,9 @@ void finish_transfer(char *fname, char *
+@@ -243,7 +246,8 @@ void finish_transfer(char *fname, char *
                    ret == -2 ? "copy" : "rename",
                    full_fname(fnametmp), fname, strerror(errno));
                do_unlink(fnametmp);
 -      } else {
--              set_perms(fname,file,NULL,0);
 +      } else if (ret == 1) {
 +              /* The file got copied, so set the permissions again. */
-+              set_perms(fname, file, NULL, 0);
+               set_perms(fname, file, NULL,
+                         ok_to_set_time ? 0 : PERMS_SKIP_MTIME);
        }
- }
 --- t_stub.c   22 Apr 2004 09:58:11 -0000      1.7
-+++ t_stub.c   29 Apr 2004 19:49:59 -0000
++++ t_stub.c   13 May 2004 19:01:10 -0000
 @@ -26,6 +26,7 @@
   * functions, so that module test harnesses can run standalone.
   **/
@@ -32,8 +30,8 @@
  int modify_window = 0;
  int module_id = -1;
  struct exclude_list_struct server_exclude_list;
---- util.c     27 Apr 2004 19:59:37 -0000      1.141
-+++ util.c     29 Apr 2004 19:49:59 -0000
+--- util.c     8 May 2004 20:03:39 -0000       1.142
++++ util.c     13 May 2004 19:01:10 -0000
 @@ -28,6 +28,7 @@
  #include "rsync.h"
  
index f48325d..61142ea 100644 (file)
@@ -1,8 +1,8 @@
 This patch from Sami Farin lets you specify --fsync if you want fsync()
 to be called on every file we write.
 
---- options.c  17 Apr 2004 17:07:23 -0000      1.147
-+++ options.c  27 Apr 2004 20:05:03 -0000
+--- options.c  6 May 2004 21:08:01 -0000       1.148
++++ options.c  13 May 2004 19:01:45 -0000
 @@ -37,6 +37,7 @@ int make_backups = 0;
   **/
  int whole_file = -1;
@@ -37,17 +37,17 @@ to be called on every file we write.
  
        if (compare_dest && am_sender) {
                /* the server only needs this option if it is not the sender,
---- receiver.c 27 Apr 2004 19:51:33 -0000      1.76
-+++ receiver.c 27 Apr 2004 20:05:03 -0000
-@@ -45,6 +45,7 @@ extern int cleanup_got_literal;
- extern int module_id;
+--- receiver.c 13 May 2004 07:08:22 -0000      1.77
++++ receiver.c 13 May 2004 19:01:46 -0000
+@@ -46,6 +46,7 @@ extern int module_id;
  extern int ignore_errors;
  extern int orig_umask;
+ extern int keep_partial;
 +extern int do_fsync;
  
  static void delete_one(char *fn, int is_dir)
  {
-@@ -264,6 +265,12 @@ static int receive_data(int f_in,struct 
+@@ -265,6 +266,12 @@ static int receive_data(int f_in,struct 
  
        if (fd != -1 && offset > 0 && sparse_end(fd) != 0) {
                rprintf(FERROR, "write failed on %s: %s\n",
@@ -60,8 +60,8 @@ to be called on every file we write.
                        full_fname(fname), strerror(errno));
                exit_cleanup(RERR_FILEIO);
        }
---- util.c     27 Apr 2004 19:59:37 -0000      1.141
-+++ util.c     27 Apr 2004 20:05:04 -0000
+--- util.c     8 May 2004 20:03:39 -0000       1.142
++++ util.c     13 May 2004 19:01:46 -0000
 @@ -29,6 +29,7 @@
  
  extern int verbose;
index 0bae7d3..75fe2c9 100644 (file)
@@ -13,7 +13,7 @@ test suite, but otherwise UNTESTED.]
   Anyone who quotes me in their sig is an idiot. -- Rusty Russell.
 
 --- Makefile.in        2 May 2004 17:04:14 -0000       1.100
-+++ Makefile.in        8 May 2004 18:41:35 -0000
++++ Makefile.in        13 May 2004 19:15:31 -0000
 @@ -32,7 +32,7 @@ ZLIBOBJ=zlib/deflate.o zlib/infblock.o z
        zlib/inflate.o zlib/inftrees.o zlib/infutil.o zlib/trees.o \
        zlib/zutil.o zlib/adler32.o
@@ -23,8 +23,8 @@ test suite, but otherwise UNTESTED.]
  OBJS2=options.o flist.o io.o compat.o hlink.o token.o uidlist.o socket.o \
        fileio.o batch.o clientname.o
  OBJS3=progress.o pipe.o
---- generator.c        5 May 2004 17:15:03 -0000       1.81
-+++ generator.c        8 May 2004 18:41:36 -0000
+--- generator.c        13 May 2004 06:55:01 -0000      1.82
++++ generator.c        13 May 2004 19:15:31 -0000
 @@ -51,6 +51,7 @@ extern int list_only;
  extern int only_existing;
  extern int orig_umask;
@@ -52,7 +52,7 @@ test suite, but otherwise UNTESTED.]
 +                              return -2;
 +                      }
 +                      if (skip_file(fname, file, st)) {
-+                              set_perms(fname, file, st, 1);
++                              set_perms(fname, file, st, PERMS_REPORT);
 +                              return -2;
 +                      }
 +                      fd = do_open(fname, O_RDONLY, 0);
@@ -105,7 +105,7 @@ test suite, but otherwise UNTESTED.]
  
        if (list_only)
                return;
-@@ -397,108 +451,38 @@ void recv_generator(char *fname, struct 
+@@ -398,108 +452,38 @@ void recv_generator(char *fname, struct 
        }
  #endif
  
@@ -193,7 +193,7 @@ test suite, but otherwise UNTESTED.]
  
 -      if (skip_file(fname, file, &st)) {
 -              if (fnamecmp == fname)
--                      set_perms(fname,file,&st,1);
+-                      set_perms(fname, file, &st, PERMS_REPORT);
 -              return;
 -      }
 -
@@ -234,7 +234,7 @@ test suite, but otherwise UNTESTED.]
                return;
        }
  
-@@ -508,7 +492,7 @@ void recv_generator(char *fname, struct 
+@@ -509,7 +493,7 @@ void recv_generator(char *fname, struct 
                mapbuf = NULL;
  
        if (verbose > 3) {
@@ -244,7 +244,7 @@ test suite, but otherwise UNTESTED.]
        }
  
 --- options.c  6 May 2004 21:08:01 -0000       1.148
-+++ options.c  8 May 2004 18:41:36 -0000
++++ options.c  13 May 2004 19:15:32 -0000
 @@ -91,6 +91,7 @@ int ignore_errors = 0;
  int modify_window = 0;
  int blocking_io = -1;
@@ -279,17 +279,17 @@ test suite, but otherwise UNTESTED.]
  
        *argc = ac;
        return;
---- receiver.c 27 Apr 2004 19:51:33 -0000      1.76
-+++ receiver.c 8 May 2004 18:41:36 -0000
-@@ -45,6 +45,7 @@ extern int cleanup_got_literal;
- extern int module_id;
+--- receiver.c 13 May 2004 07:08:22 -0000      1.77
++++ receiver.c 13 May 2004 19:15:32 -0000
+@@ -46,6 +46,7 @@ extern int module_id;
  extern int ignore_errors;
  extern int orig_umask;
+ extern int keep_partial;
 +extern int fuzzy;
  
  static void delete_one(char *fn, int is_dir)
  {
-@@ -292,8 +293,6 @@ int recv_files(int f_in,struct file_list
+@@ -293,8 +294,6 @@ int recv_files(int f_in,struct file_list
        char *fname, fbuf[MAXPATHLEN];
        char template[MAXPATHLEN];
        char fnametmp[MAXPATHLEN];
@@ -298,7 +298,7 @@ test suite, but otherwise UNTESTED.]
        struct map_struct *mapbuf;
        int i;
        struct file_struct *file;
-@@ -356,35 +355,31 @@ int recv_files(int f_in,struct file_list
+@@ -357,35 +356,31 @@ int recv_files(int f_in,struct file_list
                if (verbose > 2)
                        rprintf(FINFO,"recv_files(%s)\n",fname);
  
@@ -343,7 +343,7 @@ test suite, but otherwise UNTESTED.]
                        receive_data(f_in, NULL, -1, NULL, file->length);
                        close(fd1);
                        continue;
-@@ -405,8 +400,10 @@ int recv_files(int f_in,struct file_list
+@@ -406,8 +401,10 @@ int recv_files(int f_in,struct file_list
  
                if (fd1 != -1 && st.st_size > 0) {
                        mapbuf = map_file(fd1,st.st_size);
index 0ba548d..ba8e3ed 100644 (file)
@@ -1,7 +1,7 @@
 Patch from Mark Curtis to implement the --inplace option.
 
---- match.c    3 Jan 2004 19:28:03 -0000       1.60
-+++ match.c    8 May 2004 18:38:33 -0000
+--- match.c    13 May 2004 06:46:20 -0000      1.61
++++ match.c    13 May 2004 19:02:25 -0000
 @@ -22,6 +22,7 @@
  extern int verbose;
  extern int am_server;
@@ -22,7 +22,7 @@ Patch from Mark Curtis to implement the --inplace option.
  
                        if (verbose > 3)
 --- options.c  6 May 2004 21:08:01 -0000       1.148
-+++ options.c  8 May 2004 18:38:33 -0000
++++ options.c  13 May 2004 19:02:25 -0000
 @@ -91,6 +91,7 @@ int ignore_errors = 0;
  int modify_window = 0;
  int blocking_io = -1;
@@ -67,17 +67,17 @@ Patch from Mark Curtis to implement the --inplace option.
  
        if (tmpdir) {
                args[ac++] = "--temp-dir";
---- receiver.c 27 Apr 2004 19:51:33 -0000      1.76
-+++ receiver.c 8 May 2004 18:38:33 -0000
-@@ -45,6 +45,7 @@ extern int cleanup_got_literal;
- extern int module_id;
+--- receiver.c 13 May 2004 07:08:22 -0000      1.77
++++ receiver.c 13 May 2004 19:02:25 -0000
+@@ -46,6 +46,7 @@ extern int module_id;
  extern int ignore_errors;
  extern int orig_umask;
+ extern int keep_partial;
 +extern int inplace;
  
  static void delete_one(char *fn, int is_dir)
  {
-@@ -249,16 +250,28 @@ static int receive_data(int f_in,struct 
+@@ -250,16 +251,28 @@ static int receive_data(int f_in,struct 
                        sum_update(map,len);
                }
  
@@ -110,7 +110,7 @@ Patch from Mark Curtis to implement the --inplace option.
        if (do_progress)
                end_progress(total_size);
  
-@@ -410,37 +423,50 @@ int recv_files(int f_in,struct file_list
+@@ -411,37 +424,50 @@ int recv_files(int f_in,struct file_list
                } else
                        mapbuf = NULL;
  
@@ -189,17 +189,17 @@ Patch from Mark Curtis to implement the --inplace option.
                }
  
                cleanup_set(fnametmp, fname, file, mapbuf, fd1, fd2);
---- rsync.c    23 Mar 2004 16:16:15 -0000      1.135
-+++ rsync.c    8 May 2004 18:38:33 -0000
-@@ -33,6 +33,7 @@ extern int preserve_uid;
+--- rsync.c    13 May 2004 18:51:22 -0000      1.138
++++ rsync.c    13 May 2004 19:02:25 -0000
+@@ -31,6 +31,7 @@ extern int am_generator;
+ extern int preserve_uid;
  extern int preserve_gid;
- extern int preserve_perms;
  extern int make_backups;
 +extern int inplace;
  
  
  /*
-@@ -234,6 +235,11 @@ void finish_transfer(char *fname, char *
+@@ -235,6 +236,11 @@ void finish_transfer(char *fname, char *
  
        if (make_backups && !make_backup(fname))
                return;
@@ -212,7 +212,7 @@ Patch from Mark Curtis to implement the --inplace option.
        /* move tmp file over real file */
        ret = robust_rename(fnametmp, fname, file->mode & INITACCESSPERMS);
 --- rsync.yo   7 May 2004 00:18:37 -0000       1.169
-+++ rsync.yo   8 May 2004 18:38:34 -0000
++++ rsync.yo   13 May 2004 19:02:26 -0000
 @@ -289,6 +289,7 @@ verb(
       --backup-dir            make backups into this directory
       --suffix=SUFFIX         backup suffix (default ~ w/o --backup-dir)