1

I'm using Subversion on Unix-based systems.

In my current working directory, the subdirectory ./tmp is managed by Subversion. I would like all contents under ./tmp to be ignored by subversion.

To phrase it another way: When a user does svn checkout project/tmp, I want them to have the directory ./tmp in their directory. When that same user does svn stat, I want svn to ignore their temporary files under ./tmp without affecting other directories like ./doc and ./foo.

% svn stat
?       foo/bar.tar.gz
?       tmp/foo.example.org
?       tmp/host.log
?       tmp/getscript.vba
?       doc/Manuals/Nagios
?       doc/Manuals/3ware
?       doc/Manuals/markdown

I know that global-ignores can be used to ignore patterns like global-ignores = *.o *.lo *.la *.al *.swp *old .Trash, but can it ignore all files under a given directory? I have tried adding /tmp/* tmp/* */tmp/* to global-ignores to no avail.

1 Answer 1

3

You should be able to use svn propset svn:ignore '*' ./tmp which will set the per-directory ignore glob in the ./tmp directory. Be sure you quote the * or else your shell will replace it with whatever files are in the folder you're in now.

2
  • This works great. Is this possible to set in ~/.subversion/config? Oct 15, 2010 at 17:55
  • 1
    Not that I can figure out, since this is a property of a specific directory in a specific repository. If you want this to apply to every tmp folder in every project anywhere, it might be possible through the auto-props feature but all the documentation I have on that talks about files, not directories, and autoprops are only used on add and import commands, so they would not help on existing repositories. On top of all that, a setting in ~/.subversion/config would only apply to you, svn:ignore applies to everyone.
    – DerfK
    Oct 15, 2010 at 21:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .