3 # This script finds all CVS/Entries files in the current directory and below
4 # and creates a local .cvsinclude file with non-inherited rules including each
5 # checked-in file. Then, use this option whenever using --cvs-exclude (-C):
9 # That ensures that all checked-in files/dirs are included in the transfer.
10 # (You could alternately put ": .cvsinclude" into an .rsync-filter file and
11 # use the -F option, which is easier to type.)
13 # The downside is that you need to remember to re-run cvs2includes whenever
14 # you add a new file to the project.
17 open(FIND
, 'find . -name CVS -type d |') or die $!;
22 my $entries = "$_/Entries";
26 open(ENTRIES
, $entries) or die "Unable to open $entries: $!\n";
29 push(@includes, $1) if m
#/(.+?)/#;
33 open(FILTER
, ">$filter") or die "Unable to write $filter: $!\n";
34 print FILTER
map "+ /$_\n", @includes;
36 print "Updated $filter\n";
37 } elsif (-f
$filter) {
39 print "Removed $filter\n";