From 8d30d1c32937383f6d6003b485a4aab985dac6c2 Mon Sep 17 00:00:00 2001 From: Wayne Davison Date: Fri, 11 Feb 2005 22:47:21 +0000 Subject: [PATCH] Made the hide/protect antonym rules better. --- sender-receiver-excludes.diff | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/sender-receiver-excludes.diff b/sender-receiver-excludes.diff index 8081e1c..93c3a7d 100644 --- a/sender-receiver-excludes.diff +++ b/sender-receiver-excludes.diff @@ -33,7 +33,7 @@ See the updated manpage for the details. if (!checksum_seed) checksum_seed = time(NULL); --- orig/exclude.c 2005-02-11 10:53:14 -+++ exclude.c 2005-02-08 18:34:22 ++++ exclude.c 2005-02-11 22:39:37 @@ -53,7 +53,8 @@ struct filter_list_struct server_filter_ #define MAX_RULE_PREFIX (16) @@ -63,14 +63,14 @@ See the updated manpage for the details. + if ((s = RULE_STRCMP(s, "protect")) != NULL) + ch = 'P'; + break; ++ case 'r': ++ if ((s = RULE_STRCMP(s, "risk")) != NULL) ++ ch = 'R'; ++ break; + case 's': -+ if ((s = RULE_STRCMP(s, "send")) != NULL) ++ if ((s = RULE_STRCMP(s, "show")) != NULL) + ch = 'S'; + break; -+ case 'u': -+ if ((s = RULE_STRCMP(s, "unprotect")) != NULL) -+ ch = 'U'; -+ break; + default: ch = *s; @@ -86,7 +86,7 @@ See the updated manpage for the details. + new_mflags |= MATCHFLG_SENDER_SIDE; + mods = MODIFIERS_HIDE_PROTECT; + break; -+ case 'U': ++ case 'R': + new_mflags |= MATCHFLG_INCLUDE; + /* FALL THROUGH */ + case 'P': @@ -237,7 +237,7 @@ See the updated manpage for the details. struct filter_struct { struct filter_struct *next; --- orig/rsync.yo 2005-02-11 10:53:15 -+++ rsync.yo 2005-02-11 10:58:06 ++++ rsync.yo 2005-02-11 22:40:50 @@ -679,7 +679,9 @@ send the whole directory (e.g. "dir" or for the directory's contents (e.g. "dir/*") since the wildcard is expanded by the shell and rsync thus gets a request to transfer individual files, not @@ -264,9 +264,9 @@ See the updated manpage for the details. bf(merge, .) specifies a merge-file to read for more rules. nl() bf(dir-merge, :) specifies a per-directory merge-file. nl() +bf(hide, H) specifies a pattern for hiding files from the transfer. nl() -+bf(send, S) the opposite of a "hide". nl() ++bf(show, S) files that match the pattern are not hidden. nl() +bf(protect, P) specifies a pattern for protecting files from deletion. nl() -+bf(unprotect, U) the opposite of a "protect". nl() ++bf(risk, R) files that match the pattern are not protected. nl() bf(clear, !) clears the current include/exclude list (takes no arg) nl() ) @@ -306,7 +306,7 @@ See the updated manpage for the details. + it() An bf(r) is used to indicate that the rule applies to the receiving + side. When a rule affects the receiving side, it prevents files from + being deleted. See the bf(s) modifier for more info. See also the -+ protect (P) and unprotect (U) rules, which are an alternate way to ++ protect (P) and risk (R) rules, which are an alternate way to + specify receiver-side includes/excludes. +) -- 2.34.1