Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SVN not ignoring files

I want a repository to completely ignore some certain files - the equivalent of add those files to .gitignore in a git system. I tried:

svn propset svn:ignore *.aux" .

to ignore all .aux files. However, after doing that and a successful svn commit, svn status still shows:

?       something.aux
!       somethingelse.aux

is there an even stronger way to tell it to ignore these files so they don't show up in lists like this?

like image 887
David Doria Avatar asked Nov 04 '22 05:11

David Doria


1 Answers

It's actually a common question and I strongly advise you to consider the SVNBook chapter "Ignoring Unversioned Items" that covers it.

See the important excerpt from the SVNBook which explains the behavior:

Subversion's support for ignorable file patterns extends only to the one-time process of adding unversioned files and directories to version control. Once an object is under Subversion's control, the ignore pattern mechanisms no longer apply to it. In other words, don't expect Subversion to avoid committing changes you've made to a versioned file simply because that file's name matches an ignore pattern—Subversion always notices all of its versioned objects.

According to the svn status output, your working copy contains one unversioned item (the one with the '?' sign) and one missing item (the one with the '!' sign).

?       something.aux
!       somethingelse.aux

So you've manually removed (i.e. through Windows Explorer, but not via SVN client) the somethingelse.aux and it now has 'missing' status. The other file something.aux is still unversioned and is not ignored.

If you didn't mistype the svn propset command, committed the property change and the file still has unversioned status you may find this excerpt helpful:

the patterns found in the svn:ignore property apply only to the directory on which that property is set, and not to any of its subdirectories.

Additionally you can check the svn:ignore property by issuing the svn propget command.

like image 156
bahrep Avatar answered Nov 09 '22 17:11

bahrep