regexp support
Donovan Baarda
abo@minkirri.apana.org.au
Fri, 12 Apr 2002 00:07:01 +1000
On Wed, Apr 10, 2002 at 04:34:27PM -0700, Ben Escoto wrote:
>
> LDM> I've just read the thread on --exclude --include syntax plans
> LDM> for rdiff-backup. Please don't follow the rsync route by using
> LDM> their perverted shell globing and rules.
>
> Well, I am almost done with the file selection stuff and have already
> added all the perverted globbing stuff. But regexp lovers can
> continue to use --exclude-regexp and --include-regexp and ignore the
> new --(include|exclude)(-from-filelist)? switches.
[...]
I'm interested to know what changes you might have made to my efnmatch.py
and dirscan.py. I really want to keep my stuff as common code if I can.
> Another example: if someone tries:
>
> rdiff-backup --exclude bin usr/local /backup
>
> rdiff-backup will notice that "bin" won't match anything in usr/local
> and yell until they write:
How do you test this? It would not be simple.
> rdiff-backup --exclude usr/local/bin usr/local /backup
>
> or maybe (depending on what they meant):
>
> rdiff-backup --exclude **/bin usr/local /backup
>
> so having a familiar, but more limited, syntax can help the program
> run more checks and keep users from doing things they don't intend.
I really don't like --include and --exclude being matched against the full
local path. I'd much prefer if the --include and --exclude expressions were
taken as relative to the source path. This allows you to use the same
--include --exclude options for backing up a partition that happens to be
mounted at a different point. This is equivalent to an implicit os.path.join
of the source and each --include --exclude pattern.
I would prefer that your first example not "yell", but instead be the
correct way of doing it.
--
----------------------------------------------------------------------
ABO: finger abo@minkirri.apana.org.au for more info, including pgp key
----------------------------------------------------------------------