Fixed fuzz and failed hunks.
[rsync/rsync-patches.git] / inplace.diff
index cb75fe2..0a262bb 100644 (file)
@@ -1,7 +1,7 @@
 Patch from Mark Curtis to implement the --inplace option.
 
 --- match.c    21 May 2004 08:27:04 -0000      1.62
-+++ match.c    4 Jun 2004 05:27:20 -0000
++++ match.c    6 Jun 2004 21:23:27 -0000
 @@ -23,6 +23,7 @@ extern int verbose;
  extern int am_server;
  extern int do_progress;
@@ -21,9 +21,9 @@ Patch from Mark Curtis to implement the --inplace option.
                        if (verbose > 3)
                                rprintf(FINFO,"potential match at %.0f target=%.0f %.0f sum=%08x\n",
                                        (double)offset,(double)j,(double)i,sum);
---- options.c  27 May 2004 21:51:53 -0000      1.153
-+++ options.c  4 Jun 2004 05:27:21 -0000
-@@ -92,6 +92,7 @@ int ignore_errors = 0;
+--- options.c  6 Jun 2004 19:02:40 -0000       1.155
++++ options.c  6 Jun 2004 21:23:27 -0000
+@@ -94,6 +94,7 @@ int ignore_errors = 0;
  int modify_window = 0;
  int blocking_io = -1;
  int checksum_seed = 0;
@@ -31,23 +31,23 @@ Patch from Mark Curtis to implement the --inplace option.
  unsigned int block_size = 0;
  
  
-@@ -232,6 +233,7 @@ void usage(enum logcode F)
+@@ -234,6 +235,7 @@ void usage(enum logcode F)
    rprintf(F,"     --backup-dir            make backups into this directory\n");
    rprintf(F,"     --suffix=SUFFIX         backup suffix (default %s w/o --backup-dir)\n",BACKUP_SUFFIX);
    rprintf(F," -u, --update                update only (don't overwrite newer files)\n");
 +  rprintf(F,"     --inplace               update the destination file inplace *SEE MAN PAGE*\n");
+   rprintf(F," -K, --keep-dirlinks         treat symlinked dir on receiver as dir\n");
    rprintf(F," -l, --links                 copy symlinks as symlinks\n");
    rprintf(F," -L, --copy-links            copy the referent of all symlinks\n");
-   rprintf(F,"     --copy-unsafe-links     copy the referent of \"unsafe\" symlinks\n");
-@@ -323,6 +325,7 @@ static struct poptOption long_options[] 
-   {"delete",           0,  POPT_ARG_NONE,   &delete_mode, 0, 0, 0 },
-   {"existing",         0,  POPT_ARG_NONE,   &only_existing, 0, 0, 0 },
-   {"ignore-existing",  0,  POPT_ARG_NONE,   &opt_ignore_existing, 0, 0, 0 },
+@@ -341,6 +343,7 @@ static struct poptOption long_options[] 
+   {"sparse",          'S', POPT_ARG_NONE,   &sparse_files, 0, 0, 0 },
+   {"cvs-exclude",     'C', POPT_ARG_NONE,   &cvs_exclude, 0, 0, 0 },
+   {"update",          'u', POPT_ARG_NONE,   &update_only, 0, 0, 0 },
 +  {"inplace",          0,  POPT_ARG_NONE,   &inplace, 0, 0, 0 },
-   {"delete-after",     0,  POPT_ARG_NONE,   0,              OPT_DELETE_AFTER, 0, 0 },
-   {"delete-excluded",  0,  POPT_ARG_NONE,   0,              OPT_DELETE_EXCLUDED, 0, 0 },
-   {"force",            0,  POPT_ARG_NONE,   &force_delete, 0, 0, 0 },
-@@ -735,6 +738,9 @@ int parse_arguments(int *argc, const cha
+   {"keep-dirlinks",   'K', POPT_ARG_NONE,   &keep_dirlinks, 0, 0, 0 },
+   {"links",           'l', POPT_ARG_NONE,   &preserve_links, 0, 0, 0 },
+   {"copy-links",      'L', POPT_ARG_NONE,   &copy_links, 0, 0, 0 },
+@@ -744,6 +747,9 @@ int parse_arguments(int *argc, const cha
                        bwlimit_writemax = 512;
        }
  
@@ -57,7 +57,7 @@ Patch from Mark Curtis to implement the --inplace option.
        if (files_from) {
                char *colon;
                if (*argc != 2 && !(am_server && am_sender && *argc == 1)) {
-@@ -957,6 +963,9 @@ void server_options(char **args,int *arg
+@@ -968,6 +974,9 @@ void server_options(char **args,int *arg
        if (opt_ignore_existing && am_sender)
                args[ac++] = "--ignore-existing";
  
@@ -68,7 +68,7 @@ Patch from Mark Curtis to implement the --inplace option.
                args[ac++] = "--temp-dir";
                args[ac++] = tmpdir;
 --- receiver.c 21 May 2004 08:27:04 -0000      1.79
-+++ receiver.c 4 Jun 2004 05:27:21 -0000
++++ receiver.c 6 Jun 2004 21:23:27 -0000
 @@ -47,6 +47,7 @@ extern int ignore_errors;
  extern int orig_umask;
  extern int keep_partial;
@@ -190,7 +190,7 @@ Patch from Mark Curtis to implement the --inplace option.
  
                cleanup_set(fnametmp, fname, file, mapbuf, fd1, fd2);
 --- rsync.c    21 May 2004 08:43:03 -0000      1.140
-+++ rsync.c    4 Jun 2004 05:27:21 -0000
++++ rsync.c    6 Jun 2004 21:23:27 -0000
 @@ -34,6 +34,7 @@ extern int force_delete;
  extern int recurse;
  extern int make_backups;
@@ -211,19 +211,19 @@ Patch from Mark Curtis to implement the --inplace option.
        /* move tmp file over real file */
        ret = robust_rename(fnametmp, fname, file->mode & INITACCESSPERMS);
        if (ret < 0) {
---- rsync.yo   21 May 2004 09:44:32 -0000      1.170
-+++ rsync.yo   4 Jun 2004 05:27:22 -0000
+--- rsync.yo   5 Jun 2004 16:16:30 -0000       1.171
++++ rsync.yo   6 Jun 2004 21:23:28 -0000
 @@ -289,6 +289,7 @@ verb(
       --backup-dir            make backups into this directory
       --suffix=SUFFIX         backup suffix (default ~ w/o --backup-dir)
   -u, --update                update only (don't overwrite newer files)
 +     --inplace               update the destination file inplace
+  -K, --keep-dirlinks         treat symlinked dir on receiver as dir
   -l, --links                 copy symlinks as symlinks
   -L, --copy-links            copy the referent of all symlinks
-      --copy-unsafe-links     copy the referent of "unsafe" symlinks
-@@ -479,6 +480,17 @@ symlink where the destination has a file
- regardless of the timestamps.  This might change in the future (feel
- free to comment on this on the mailing list if you have an opinion).
+@@ -484,6 +485,17 @@ dit(bf(-K, --keep-dirlinks)) On the rece
+ pointing to a directory, it will be treated as matching a directory
+ from the sender.
  
 +dit(bf(--inplace)) This causes rsync not to create a new copy of the file
 +and then move it into place.  Instead rsync will overwrite the existing