Fix failing hunks.
[rsync/rsync-patches.git] / dir-times.diff
index 68ca5d6..e6a6aea 100644 (file)
@@ -1,6 +1,6 @@
---- options.c  6 May 2004 21:08:01 -0000       1.148
-+++ options.c  18 May 2004 09:48:58 -0000
-@@ -46,6 +46,7 @@ int preserve_devices = 0;
+--- orig/options.c     2004-07-16 20:07:22
++++ options.c  2004-07-03 20:17:33
+@@ -48,6 +48,7 @@ int preserve_devices = 0;
  int preserve_uid = 0;
  int preserve_gid = 0;
  int preserve_times = 0;
@@ -8,7 +8,7 @@
  int update_only = 0;
  int cvs_exclude = 0;
  int dry_run = 0;
-@@ -240,7 +241,8 @@ void usage(enum logcode F)
+@@ -250,7 +251,8 @@ void usage(enum logcode F)
    rprintf(F," -o, --owner                 preserve owner (root only)\n");
    rprintf(F," -g, --group                 preserve group\n");
    rprintf(F," -D, --devices               preserve devices (root only)\n");
@@ -18,7 +18,7 @@
    rprintf(F," -S, --sparse                handle sparse files efficiently\n");
    rprintf(F," -n, --dry-run               show what would have been transferred\n");
    rprintf(F," -W, --whole-file            copy whole files, no incremental checks\n");
-@@ -346,6 +348,7 @@ static struct poptOption long_options[] 
+@@ -359,6 +361,7 @@ static struct poptOption long_options[] 
    {"group",           'g', POPT_ARG_NONE,   &preserve_gid, 0, 0, 0 },
    {"devices",         'D', POPT_ARG_NONE,   &preserve_devices, 0, 0, 0 },
    {"times",           't', POPT_ARG_NONE,   &preserve_times, 0, 0, 0 },
@@ -26,7 +26,7 @@
    {"checksum",        'c', POPT_ARG_NONE,   &always_checksum, 0, 0, 0 },
    {"verbose",         'v', POPT_ARG_NONE,   0,               'v', 0, 0 },
    {"quiet",           'q', POPT_ARG_NONE,   0,               'q', 0, 0 },
-@@ -823,6 +826,8 @@ void server_options(char **args,int *arg
+@@ -875,6 +878,8 @@ void server_options(char **args,int *arg
                argstr[x++] = 'D';
        if (preserve_times)
                argstr[x++] = 't';
@@ -35,8 +35,8 @@
        if (preserve_perms)
                argstr[x++] = 'p';
        if (recurse)
---- rsync.c    15 May 2004 19:31:10 -0000      1.139
-+++ rsync.c    18 May 2004 09:48:58 -0000
+--- orig/rsync.c       2004-07-16 20:07:23
++++ rsync.c    2004-07-03 20:17:33
 @@ -25,6 +25,7 @@
  extern int verbose;
  extern int dry_run;
  extern int am_root;
  extern int am_sender;
  extern int am_generator;
-@@ -138,14 +139,16 @@ int set_perms(char *fname,struct file_st
+@@ -141,15 +142,16 @@ int set_perms(char *fname,struct file_st
                st = &st2;
        }
  
--      if (!preserve_times || S_ISLNK(st->st_mode))
+-      if (!preserve_times || S_ISLNK(st->st_mode)
+-          || (make_backups && !backup_dir && S_ISDIR(st->st_mode)))
 -              flags |= PERMS_SKIP_MTIME;
 +      if (S_ISDIR(st->st_mode)) {
-+              if (!preserve_dir_times)
++              if (!preserve_dir_times || (make_backups && !backup_dir))
 +                      flags |= PERMS_SKIP_MTIME;
 +      } else {
 +              if (!preserve_times || S_ISLNK(st->st_mode))
@@ -68,9 +69,9 @@
                        rsyserr(FERROR, errno, "failed to set times on %s",
                                full_fname(fname));
                        return 0;
---- rsync.yo   7 May 2004 00:18:37 -0000       1.169
-+++ rsync.yo   18 May 2004 09:48:58 -0000
-@@ -298,7 +298,8 @@ verb(
+--- orig/rsync.yo      2004-07-16 20:07:23
++++ rsync.yo   2004-07-03 20:17:33
+@@ -300,7 +300,8 @@ verb(
   -o, --owner                 preserve owner (root only)
   -g, --group                 preserve group
   -D, --devices               preserve devices (root only)
@@ -80,7 +81,7 @@
   -S, --sparse                handle sparse files efficiently
   -n, --dry-run               show what would have been transferred
   -W, --whole-file            copy whole files, no incremental checks
-@@ -538,13 +539,22 @@ dit(bf(-D, --devices)) This option cause
+@@ -556,14 +557,23 @@ dit(bf(-D, --devices)) This option cause
  block device information to the remote system to recreate these
  devices. This option is only available to the super-user.
  
@@ -93,7 +94,7 @@
  cause the next transfer to behave as if it used -I, and all files will have
  their checksums compared and show up in log messages even if they haven't
  changed.
-+
 +dit(bf(-d, --dir-times)) This tells rsync to preserve the modification
 +times of directories transferred to the remote system.  On a modern
 +rsync, these are left unpreserved by default to avoid causing problems
 +Note: when sending files to an older rsync, the --times option will
 +imply --dir-times (if the option causes an error on the receiving
 +system, omit it and use --times to preserve all file/directory times).
++
  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       18 May 2004 00:41:35 -0000      1.11
-+++ testsuite/chgrp.test       18 May 2004 09:48:58 -0000
+--- orig/testsuite/chgrp.test  2004-05-21 23:56:27
++++ testsuite/chgrp.test       2004-07-03 20:17:33
 @@ -26,7 +26,7 @@ do
  done
  sleep 2
  
--checkit "$RSYNC -rtgvvv \"$fromdir/\" \"$todir/\"" "$fromdir" "$todir"
-+checkit "$RSYNC -rtdgvvv \"$fromdir/\" \"$todir/\"" "$fromdir" "$todir"
+-checkit "$RSYNC -rtgpvvv \"$fromdir/\" \"$todir/\"" "$fromdir" "$todir"
++checkit "$RSYNC -rtdgpvvv \"$fromdir/\" \"$todir/\"" "$fromdir" "$todir"
  
  # The script would have aborted on error, so getting here means we've won.
  exit 0
---- testsuite/chown.test       18 May 2004 00:41:35 -0000      1.5
-+++ testsuite/chown.test       18 May 2004 09:48:58 -0000
+--- orig/testsuite/chown.test  2004-05-18 09:14:24
++++ testsuite/chown.test       2004-07-03 20:17:33
 @@ -28,7 +28,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        18 May 2004 00:41:51 -0000      1.7
-+++ testsuite/daemon-gzip-download.test        18 May 2004 09:48:58 -0000
+--- orig/testsuite/daemon-gzip-download.test   2004-05-18 09:14:24
++++ testsuite/daemon-gzip-download.test        2004-07-03 20:17:33
 @@ -29,9 +29,9 @@ export RSYNC_CONNECT_PROG
  hands_setup
  
  
  # The script would have aborted on error, so getting here means we've won.
  exit 0
---- testsuite/daemon-gzip-upload.test  18 May 2004 00:41:51 -0000      1.7
-+++ testsuite/daemon-gzip-upload.test  18 May 2004 09:48:58 -0000
+--- orig/testsuite/daemon-gzip-upload.test     2004-05-18 09:14:24
++++ testsuite/daemon-gzip-upload.test  2004-07-03 20:17:33
 @@ -23,9 +23,9 @@ export RSYNC_CONNECT_PROG
  hands_setup
  
  
  # The script would have aborted on error, so getting here means we've won.
  exit 0
---- testsuite/devices.test     18 May 2004 00:41:35 -0000      1.8
-+++ testsuite/devices.test     18 May 2004 09:48:58 -0000
+--- orig/testsuite/devices.test        2004-05-18 09:14:24
++++ testsuite/devices.test     2004-07-03 20:17:33
 @@ -29,7 +29,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  18 May 2004 00:41:35 -0000      1.10
-+++ testsuite/duplicates.test  18 May 2004 09:48:59 -0000
+--- orig/testsuite/duplicates.test     2004-05-18 09:14:24
++++ testsuite/duplicates.test  2004-07-03 20:17:33
 @@ -33,7 +33,7 @@ ln -s "$name1" "$name2" || fail "can't c
  
  outfile="$scratchdir/rsync.out"
      | tee "$outfile"
  
  # Make sure each file was only copied once...
---- testsuite/exclude.test     18 May 2004 00:41:38 -0000      1.6
-+++ testsuite/exclude.test     18 May 2004 09:48:59 -0000
-@@ -63,7 +63,7 @@ EOF
+--- orig/testsuite/exclude.test        2004-05-29 21:25:45
++++ testsuite/exclude.test     2004-07-03 20:17:33
+@@ -66,7 +66,7 @@ EOF
  
  # Create the chk dir with what we expect to be excluded
  
  
  sleep 1 # Ensures that the rm commands will tweak the directory times.
  
-@@ -75,11 +75,11 @@ rm "$chkdir"/mid/for/foo/extra
+@@ -78,11 +78,11 @@ rm "$chkdir"/mid/for/foo/extra
  
  # Un-tweak the directory times in our first (weak) exclude test (though
  # it's a good test of the --existing option).
  
  # Now, test if rsync excludes the same files.
  
--checkit "$RSYNC -avv --exclude-from=$excl \"$fromdir/\" \"$todir/\"" "$chkdir" "$todir"
-+checkit "$RSYNC -advv --exclude-from=$excl \"$fromdir/\" \"$todir/\"" "$chkdir" "$todir"
+-checkit "$RSYNC -avv --exclude-from=\"$excl\" \"$fromdir/\" \"$todir/\"" "$chkdir" "$todir"
++checkit "$RSYNC -advv --exclude-from=\"$excl\" \"$fromdir/\" \"$todir/\"" "$chkdir" "$todir"
  
  # Modify the chk dir by removing cvs-ignored files and then tweaking the dir times.
  
-@@ -89,12 +89,12 @@ rm "$chkdir"/bar/down/to/foo/*.junk
+@@ -92,12 +92,12 @@ rm "$chkdir"/bar/down/to/foo/*.junk
  rm "$chkdir"/bar/down/to/home-cvs-exclude
  rm "$chkdir"/mid/one-in-one-out
  
  # Now, test if rsync excludes the same files, this time with --cvs-exclude
  # and --delete-excluded.
  
--checkit "$RSYNC -avvC --delete-excluded --exclude-from=$excl \
-+checkit "$RSYNC -advvC --delete-excluded --exclude-from=$excl \
-     \"$fromdir/\" \"$todir/\"" "$chkdir" "$todir"
+-checkit "$RSYNC -avvC --exclude-from=\"$excl\" \
++checkit "$RSYNC -advvC --exclude-from=\"$excl\" \
+     --delete-excluded \"$fromdir/\" \"$todir/\"" "$chkdir" "$todir"
  
  # The script would have aborted on error, so getting here means we've won.
---- testsuite/hands.test       18 May 2004 00:41:46 -0000      1.13
-+++ testsuite/hands.test       18 May 2004 09:48:59 -0000
+--- orig/testsuite/hands.test  2004-05-18 09:14:24
++++ testsuite/hands.test       2004-07-03 20:17:33
 @@ -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   18 May 2004 00:41:40 -0000      1.5
-+++ testsuite/hardlinks.test   18 May 2004 09:48:59 -0000
+--- orig/testsuite/hardlinks.test      2004-05-18 09:14:24
++++ testsuite/hardlinks.test   2004-07-03 20:17:33
 @@ -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     18 May 2004 09:47:42 -0000      1.11
-+++ testsuite/longdir.test     18 May 2004 09:48:59 -0000
+--- orig/testsuite/longdir.test        2004-05-18 09:50:26
++++ testsuite/longdir.test     2004-07-03 20:17:33
 @@ -18,7 +18,7 @@ makepath "$longdir" || test_skipped "una
  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       18 May 2004 00:41:38 -0000      1.6
-+++ testsuite/merge.test       18 May 2004 09:48:59 -0000
+--- orig/testsuite/merge.test  2004-05-18 09:14:24
++++ testsuite/merge.test       2004-07-03 20:17:33
 @@ -40,9 +40,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   18 May 2004 00:41:46 -0000      1.7
-+++ testsuite/ssh-basic.test   18 May 2004 09:48:59 -0000
+--- orig/testsuite/ssh-basic.test      2004-05-18 09:14:24
++++ testsuite/ssh-basic.test   2004-07-03 20:17:33
 @@ -28,7 +28,7 @@ fi
  # nothing to do.
  hands_setup
  
 -runtest "ssh: renamed file" 'checkit "$RSYNC --delete -avH -e ssh --rsync-path=$RSYNC \"$fromdir/\" \"localhost:$todir\"" "$fromdir/" "$todir"'
 +runtest "ssh: renamed file" 'checkit "$RSYNC --delete -advH -e ssh --rsync-path=$RSYNC \"$fromdir/\" \"localhost:$todir\"" "$fromdir/" "$todir"'
---- testsuite/unsafe-links.test        18 May 2004 00:41:43 -0000      1.7
-+++ testsuite/unsafe-links.test        18 May 2004 09:48:59 -0000
+--- orig/testsuite/unsafe-links.test   2004-05-18 09:14:24
++++ testsuite/unsafe-links.test        2004-07-03 20:17:33
 @@ -35,33 +35,33 @@ ln -s ../../unsafe/unsafefile "from/safe
  set -x