X-Git-Url: https://mattmccutchen.net/rsync/rsync-patches.git/blobdiff_plain/ffadcb36bef7c620b33232f88a77bb0de117ac60..0ef5abcbbb95298fa9faf1d3eb275a9e76e1d951:/cvs-entries.diff diff --git a/cvs-entries.diff b/cvs-entries.diff index 61255e2..be52c61 100644 --- a/cvs-entries.diff +++ b/cvs-entries.diff @@ -2,9 +2,16 @@ This patch causes the --cvs-exclude option to prefix the names listed in each dir's CVS/Entries file as per-dir includes before the dir's list of excludes taken from the .cvsignore file. ---- orig/exclude.c 2005-12-24 07:53:38 -+++ exclude.c 2005-12-17 21:18:38 -@@ -212,6 +212,8 @@ static void add_rule(struct filter_list_ +To use this patch, run these commands for a successful build: + + patch -p1 head = lp->tail = NULL; @@ -13,7 +20,7 @@ of excludes taken from the .cvsignore file. if (asprintf(&lp->debug_type, " [per-dir %s]", cp) < 0) out_of_memory("add_rule"); ret->u.mergelist = lp; -@@ -446,6 +448,14 @@ void *push_local_filters(const char *dir +@@ -470,6 +472,14 @@ void *push_local_filters(const char *dir, unsigned int dirlen) set_filter_dir(dir, dirlen); } @@ -28,7 +35,7 @@ of excludes taken from the .cvsignore file. if (strlcpy(dirbuf + dirbuf_len, ex->pattern, MAXPATHLEN - dirbuf_len) < MAXPATHLEN - dirbuf_len) { parse_filter_file(lp, dirbuf, ex->match_flags, -@@ -962,6 +972,7 @@ void parse_filter_file(struct filter_lis +@@ -1030,6 +1040,7 @@ void parse_filter_file(struct filter_list_struct *listp, const char *fname, char line[BIGPATHBUFLEN]; char *eob = line + sizeof line - 1; int word_split = mflags & MATCHFLG_WORD_SPLIT; @@ -36,8 +43,8 @@ of excludes taken from the .cvsignore file. if (!fname || !*fname) return; -@@ -1006,6 +1017,24 @@ void parse_filter_file(struct filter_lis - continue; +@@ -1076,6 +1087,24 @@ void parse_filter_file(struct filter_list_struct *listp, const char *fname, + } break; } + switch (slash_parse) { /* CVS/Entries parsing: */ @@ -61,7 +68,7 @@ of excludes taken from the .cvsignore file. if (word_split && isspace(ch)) break; if (eol_nulls? !ch : (ch == '\n' || ch == '\r')) -@@ -1015,13 +1044,15 @@ void parse_filter_file(struct filter_lis +@@ -1085,13 +1114,15 @@ void parse_filter_file(struct filter_list_struct *listp, const char *fname, else overflow = 1; } @@ -78,19 +85,21 @@ of excludes taken from the .cvsignore file. parse_rule(listp, line, mflags, xflags); if (ch == EOF) break; ---- orig/rsync.h 2005-12-15 23:00:49 -+++ rsync.h 2005-12-17 19:52:48 -@@ -116,6 +116,7 @@ - #define XFLG_OLD_PREFIXES (1<<1) - #define XFLG_ANCHORED2ABS (1<<2) - #define XFLG_ABS_IF_SLASH (1<<3) -+#define XFLG_CVS_ENTRIES (1<<4) +diff --git a/rsync.h b/rsync.h +--- a/rsync.h ++++ b/rsync.h +@@ -151,6 +151,7 @@ + #define XFLG_ANCHORED2ABS (1<<2) /* leading slash indicates absolute */ + #define XFLG_ABS_IF_SLASH (1<<3) /* leading or interior slash is absolute */ + #define XFLG_DIR2WILD3 (1<<4) /* dir/ match gets trailing *** added */ ++#define XFLG_CVS_ENTRIES (1<<5) - #define PERMS_REPORT (1<<0) - #define PERMS_SKIP_MTIME (1<<1) ---- orig/testsuite/exclude.test 2005-12-24 07:49:27 -+++ testsuite/exclude.test 2005-12-30 07:32:41 -@@ -22,6 +22,7 @@ set -x + #define ATTRS_REPORT (1<<0) + #define ATTRS_SKIP_MTIME (1<<1) +diff --git a/testsuite/exclude.test b/testsuite/exclude.test +--- a/testsuite/exclude.test ++++ b/testsuite/exclude.test +@@ -19,6 +19,7 @@ export CVSIGNORE makepath "$fromdir/foo/down/to/you" makepath "$fromdir/foo/sub" @@ -98,7 +107,7 @@ of excludes taken from the .cvsignore file. makepath "$fromdir/bar/down/to/foo/too" makepath "$fromdir/bar/down/to/bar/baz" makepath "$fromdir/mid/for/foo/and/that/is/who" -@@ -58,6 +59,9 @@ echo cvsout >"$fromdir/bar/down/to/foo/f +@@ -57,6 +58,9 @@ echo cvsout >"$fromdir/bar/down/to/foo/file1.bak" echo gone >"$fromdir/bar/down/to/foo/file3" echo lost >"$fromdir/bar/down/to/foo/file4" echo weird >"$fromdir/bar/down/to/foo/+ file3" @@ -108,7 +117,7 @@ of excludes taken from the .cvsignore file. echo cvsout-but-filtin >"$fromdir/bar/down/to/foo/file4.junk" echo smashed >"$fromdir/bar/down/to/foo/to" cat >"$fromdir/bar/down/to/bar/.filt2" <"$excl" <"$excl" <"$scratchdir/.cvsignore" <