I just received this bug report on Debian's rsync package. I've verified it. The entry from the manpage: -C [...] Finally, any file is ignored if it is in the same directory as a .cvsignore file and matches one of the patterns listed therein. Here the patterns of a .cvsignore file is apparently used to exclude file outside the directory where the .cvsignore file is found. Any comments? Paul Slootman On Wed 24 Mar 2004, Frank Mehnert wrote:> Subject: Bug#239791: rsync: incorrect exclude list with -C > From: Frank Mehnert <fm3@os.inf.tu-dresden.de> > Date: Wed, 24 Mar 2004 11:55:16 +0100> Package: rsync > Version: 2.6.0-2 > > The current version of rsync determines an incorrect exclude list when > using the -C command line switch. The following example illustrates the > problem. Consider you have the following directory structure: > > dir bar/ contains > a1/ > a2/ > > dir bar/a1 contains > .cvsignore > > dir bar/a2 contains > zz.foo > > The file bar/a1/.cvsignore contains > *.foo > > The output of > > rsync -aRCvv bar backup > > is > > building file list ... > expand file_list to 4000 bytes, did move > excluding file bar/a2/zz.foo because of pattern *.foo > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > done > created directory backup > delta-transmission disabled for local transfer or --whole-file > bar/ > bar/a1/ > bar/a1/.cvsignore > bar/a2/ > total: matches=0 tag_hits=0 false_alarms=0 data=6 > > wrote 170 bytes read 40 bytes 420.00 bytes/sec > total size is 6 speedup is 0.03 > > The file bar/a2/zz.foo is NOT backed up. Rsync uses the wildcard *.foo > found in bar/a1 to deceide that bar/a2/zz.foo should not be backed up! > > And yes, my ~/.cvsignore is empty.
On Wed, Mar 24, 2004 at 01:12:25PM +0100, Paul Slootman wrote:> Here the patterns of a .cvsignore file is apparently used to exclude > file outside the directory where the .cvsignore file is found.Thi has been fixed in CVS since early Januaray and I've mentioned the fix on this list before: --- flist.c 13 Jan 2004 06:27:30 -0000 1.164 +++ flist.c 17 Jan 2004 01:16:49 -0000 1.165 @@ -942,7 +942,7 @@ static void send_directory(int f, struct if (cvs_exclude) { if (strlen(fname) + strlen(".cvsignore") <= MAXPATHLEN - 1) { strcpy(p, ".cvsignore"); - add_exclude_file(&exclude_list,fname,MISSING_OK,ADD_EXCLUDE); + add_exclude_file(&local_exclude_list,fname,MISSING_OK,ADD_EXCLUDE); } else { io_error |= IOERR_GENERAL; rprintf(FINFO, ..wayne..