Expanding the include/exclude options

Donovan Baarda abo@minkirri.apana.org.au
Tue, 2 Apr 2002 16:41:51 +1000

On Sun, Mar 31, 2002 at 04:51:13AM -0800, Ben Escoto wrote:
> >>>>> "DB" == Donovan Baarda <abo@minkirri.apana.org.au>
> >>>>> wrote the following on Sat, 30 Mar 2002 19:53:54 +1100
>   DB> IMHO there is some benefits in just adopting rsync's
>   DB> syntax... it saves on documentation :-)
>   DB> But if you dont, then you can do just about anything, including
>   DB> things like;
>   DB> --select '+/home/**,-**.bak' --select '+/home/** -**.bak'
>   DB> --select '+/home/**' --select '-**.bak' --include '/home/**'
>   DB> --exclude '**.bak' --select '["+/home/**","-**.bak"]'
> Yeah, now that I think about it rsync seems to have a pretty good
> system (except maybe for the implicit scanning/including stuff they
> didn't implement).  One sticky point is that rdiff-backup's --exclude
> syntax has been different from rsync's.  Ideally I think
> rdiff-backup's --include/exclude should use the ** notation, and there
> should be a separate --exclude-regexp for perl/python style regular
> expressions, but this would break some uses of the old --exclude..

Either change old --exclude into --exclude-regexp and use rsync's --include
--exclude, or keep --exclude as it is, and add --select that uses a +/- at
the front to indicate include/exclude.

Keeping a regexp option does complicate the matching, but I could add
something like it to dirscan... It does convert efn patterns to regex's to
do the matching so it shouldn't be too hard.

ABO: finger abo@minkirri.apana.org.au for more info, including pgp key