Harald Joerg wrote:
Steve Kelem writes:
I'm trying to use ttree's config file to tell it to ignore the files
administered under subversion.
Subversion files are stored in subdirectories named ".svn".
I tried including the following line in my ttree.cfg file:
ignore = \b(CVS|RCS|\.svn|xml)\b
However, I get the following messages when running ttree:
ttree 2.78 (Template Toolkit version 2.14)
...
Ignore: [ \b(CVS|RCS|.svn)\b, ^#, \b(CVS|RCS|\.svn|xml)\b, ^# ]
...
mkdir targetdir/html/.svn
+ .svn (created target directory)
+ .svn/empty-file
+ .svn/entries
+ .svn/format
Which is NOT what I want it to do.
Any ideas? Am I doing something wrong, or does ttree ignore the IGNORE
directive on directory names?
ttree evaluates its ignore pattern against the template name, which is
relative to the source directory: '.svn/*' in your case. However, \b
doesn't match at the beginning of a string.
That's not quite right. From perldoc perlre:
"A word boundary (\b) is a spot between two characters that has a \w on
one side of it and a \W on the other side of it (in either order),
counting the imaginary characters off the beginning and end of the
string as matching a \W."
$ perl -e "print ('.svn/foo' =~ /\b\.svn/ ? 'match' : 'no match')"
no match
perl -e "print ('svn/foo' =~ /\bsvn/ ? 'match' : 'no match')"
match
The problem is that a dot is not a word character, so there would have
to be a \w BEFORE the \b for it to be a word boundary. The OP needs an
separate test for the .svn case.
Cheers, Dave
_______________________________________________
templates mailing list
[email protected]
http://lists.template-toolkit.org/mailman/listinfo/templates