Archive Delete Mode

Wayne Davison
Sat, 13 Nov 2004 18:36:48 -0000

On Sat, Nov 13, 2004 at 10:02:14AM -0500, Robert Boucher
wrote:
> Patch to add an archive mode that includes deletion.

Such a patch probably won't make it into rsync, but rsync could enable
the popt alias mode that would allow people to customize their rsync
options, and thus make typing personalized rsync commands easier.  Rsync
would need this patch:

--- options.c	11 Nov 2004 01:45:25 -0000	1.187
+++ options.c	13 Nov 2004 18:25:13 -0000
@@ -548,6 +548,7 @@ int parse_arguments(int *argc, const cha
 	/* The context leaks in case of an error, but if there's a
 	 * problem we always exit anyhow. */
 	pc = poptGetContext(RSYNC_NAME, *argc, *argv, long_options, 0);
+	poptReadDefaultConfig(pc, 0);

 	while ((opt = poptGetNextOpt(pc)) != -1) {
 		/* most options are handled automatically by popt;

At which point you could create a ~/.popt file that contains any alias
you wanted to create, such as these:

rsync alias -A -a --delete
rsync alias --archive-delete -A

Those lines create both the -A and --archive-delete options that you
specified (though you probably only really need the first line, since
I doubt that you'll want to type the second one).

..wayne..