You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by "Michael J. Rivard" <ri...@sbcglobal.net> on 2007/08/15 19:34:47 UTC

Pattern for excluding a directory in global-ignores

If I want to avoid importing all directories named, for example, temp, then adding */temp/* to my list of global ignores does *not* work. This is counter-intuitive because *nix shell commands usually accept */temp/* as a valid filename pattern. However, I discovered that simply adding temp to the list of global ignores does do the trick.

What are all of the valid pathname patterns that can be used in svn:global-ignores and svn:ignore? This should be included in the Subversion book. For example, can I exclude logs only if it's in temp, i.e. temp/logs?

Best regards,
Mike

Re: Pattern for excluding a directory in global-ignores

Posted by Maddes <ma...@arcor.de>.
Hello Mike,

first you mixed up the client's configuration "global-ignores" with an
directory property. "svn:ignore" is a folder property.

Note that the ignore lists just work on the name of a directory or a
file (e.g. temp), not on pathes (e.g. /path/to/temp).

Also you can only use normal shell patterns and no regular expressions.
So stick to * and ? as these are available on all platforms.

If you are using a unix client you can also use [] patterns in its
config file, but don't put these into the "svn:ignore" property as they
will fail for Windows clients.

Here are links to the related chapters in the SVN book:
http://svnbook.red-bean.com/nightly/en/svn.advanced.props.special.ignore.html
http://svnbook.red-bean.com/nightly/en/svn.advanced.confarea.html

To solve your problem just add a line with "temp" to the "svn:ignore"
property of the folder that contains the temp folder.
I do the same for the "obj" folder of my Visual C++ projects.

Regards
Matthias "Maddes" Bücher
http://www.maddes.net/

On 15.08.2007 21:34, Michael J. Rivard wrote:
> If I want to avoid importing all directories named, for example, temp,
> then adding */temp/* to my list of global ignores does *not* work. This
> is counter-intuitive because *nix shell commands usually accept */temp/*
> as a valid filename pattern. However, I discovered that simply adding
> temp to the list of global ignores does do the trick.
>  
> What are all of the valid pathname patterns that can be used in
> svn:global-ignores and svn:ignore? This should be included in the
> Subversion book. For example, can I exclude logs only if it's in temp,
> i.e. temp/logs?
>  
> Best regards,
> Mike
>  

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org