Got rid of --copy-dest for now -- I think it should be made to do
authorWayne Davison <wayned@samba.org>
Wed, 23 Feb 2005 02:05:34 +0000 (02:05 +0000)
committerWayne Davison <wayned@samba.org>
Wed, 23 Feb 2005 02:05:34 +0000 (02:05 +0000)
the copying of unchanged files locally (like --link-dest does
using a hard link).

options.c
rsync.yo

index 09b4055..4287fd5 100644 (file)
--- a/options.c
+++ b/options.c
@@ -142,7 +142,6 @@ char *backup_dir = NULL;
 char backup_dir_buf[MAXPATHLEN];
 int rsync_port = 0;
 int compare_dest = 0;
-int copy_dest = 0;
 int link_dest = 0;
 int basis_dir_cnt = 0;
 
@@ -317,7 +316,6 @@ void usage(enum logcode F)
   rprintf(F," -T, --temp-dir=DIR          create temporary files in directory DIR\n");
   rprintf(F," -y, --fuzzy                 find similar file for basis if no dest file\n");
   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");
   rprintf(F," -z, --compress              compress file data during the transfer\n");
   rprintf(F," -C, --cvs-exclude           auto-ignore files the same way CVS does\n");
@@ -356,7 +354,7 @@ void usage(enum logcode F)
 }
 
 enum {OPT_VERSION = 1000, OPT_DAEMON, OPT_SENDER, OPT_EXCLUDE, OPT_EXCLUDE_FROM,
-      OPT_FILTER, OPT_COMPARE_DEST, OPT_COPY_DEST, OPT_LINK_DEST,
+      OPT_FILTER, OPT_COMPARE_DEST, OPT_LINK_DEST,
       OPT_INCLUDE, OPT_INCLUDE_FROM, OPT_MODIFY_WINDOW,
       OPT_READ_BATCH, OPT_WRITE_BATCH, OPT_TIMEOUT, OPT_MAX_SIZE,
       OPT_REFUSED_BASE = 9000};
@@ -425,7 +423,6 @@ static struct poptOption long_options[] = {
   {"timeout",          0,  POPT_ARG_INT,    &io_timeout, OPT_TIMEOUT, 0, 0 },
   {"temp-dir",        'T', POPT_ARG_STRING, &tmpdir, 0, 0, 0 },
   {"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 },
   {"fuzzy",           'y', POPT_ARG_NONE,   &fuzzy_basis, 0, 0, 0 },
   /* TODO: Should this take an optional int giving the compression level? */
@@ -839,11 +836,6 @@ int parse_arguments(int *argc, const char ***argv, int frommain)
                        return 0;
 #endif
 
-               case OPT_COPY_DEST:
-                       copy_dest = 1;
-                       dest_option = "--copy-dest";
-                       goto set_dest_dir;
-
                case OPT_COMPARE_DEST:
                        compare_dest = 1;
                        dest_option = "--compare-dest";
@@ -937,9 +929,9 @@ int parse_arguments(int *argc, const char ***argv, int frommain)
                return 0;
        }
 
-       if (compare_dest + copy_dest + link_dest > 1) {
+       if (compare_dest + link_dest > 1) {
                snprintf(err_buf, sizeof err_buf,
-                       "You may not mix --compare-dest, --copy-dest, and --link-dest.\n");
+                       "You may not mix --compare-dest and --link-dest.\n");
                return 0;
        }
 
index 0f2edce..6e0b2ac 100644 (file)
--- a/rsync.yo
+++ b/rsync.yo
@@ -354,7 +354,6 @@ to the detailed description below for a complete description.  verb(
  -T, --temp-dir=DIR          create temporary files in directory DIR
  -y, --fuzzy                 find similar file for basis if no dest file
      --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
  -z, --compress              compress file data during the transfer
  -C, --cvs-exclude           auto-ignore files in the same way CVS does
@@ -556,8 +555,8 @@ bound.
 
 The option implies bf(--partial) (since an interrupted transfer does not delete
 the file), but conflicts with bf(--partial-dir) and bf(--delay-updates).
-Prior to rsync 2.6.4 bf(--inplace) was also incompatible with bf(--compare-dest),
-bf(--copy-dest), and bf(--link-dest).
+Prior to rsync 2.6.4 bf(--inplace) was also incompatible with bf(--compare-dest)
+and bf(--link-dest).
 
 WARNING: The file's data will be in an inconsistent state during the
 transfer (and possibly afterward if the transfer gets interrupted), so you
@@ -950,19 +949,9 @@ finds an existing file.  That first discovery is used as the basis file,
 and also determines if the transfer needs to happen.
 
 If em(DIR) is a relative path, it is relative to the destination directory.
-See also bf(--copy-dest) and bf(--link-dest).
+See also bf(--link-dest).
 
-dit(bf(--copy-dest=DIR)) This option behaves like bf(--compare-dest), but
-rsync will also copy unchanged files found in em(DIR) to the destination
-directory (using the data in the em(DIR) for an efficient copy).  This is
-useful for doing transfers to a new destination while leaving existing
-files intact, and then doing a flash-cutover when all files have been
-successfully transferred.
-
-If em(DIR) is a relative path, it is relative to the destination directory.
-See also bf(--compare-dest) and bf(--link-dest).
-
-dit(bf(--link-dest=DIR)) This option behaves like bf(--copy-dest), but
+dit(bf(--link-dest=DIR)) This option behaves like bf(--compare-dest), but
 unchanged files are hard linked from em(DIR) to the destination directory.
 The files must be identical in all preserved attributes (e.g. permissions,
 possibly ownership) in order for the files to be linked together.
@@ -976,7 +965,7 @@ the list in the order specified), and if not found, a basis file from one
 of the em(DIR)s will be selected to try to speed up the transfer.
 
 If em(DIR) is a relative path, it is relative to the destination directory.
-See also bf(--compare-dest) and bf(--copy-dest).
+See also bf(--compare-dest).
 
 Note that rsync versions prior to 2.6.1 had a bug that could prevent
 bf(--link-dest) from working properly for a non-root user when bf(-o) was specified