I’m trying to pull together a testcase for another problem I have and for this I want to mimic a svn repository with a directory in svn:ignore.
When that value is set, the directory specified in the value is excluded from version controll? right?
below an outline of what I’ve done. And the results i got. I’m a kind of mystified, hopefully somebody here can help me.
[/tmp]$svn --version
svn, version 1.6.15 (r1038135)
compiled Nov 29 2010, 16:11:54
[/tmp]$mkdir svnadmin
[/tmp]$cd svnadmin/
[/tmp/svnadmin]$svnadmin create ignoretest
[/tmp/svnadmin]$mkdir ../client
[/tmp/svnadmin]$cd ../client
[/tmp/client]$svn co file:///tmp/svnadmin/ignoretest
Checked out revision 0.
[/tmp/client]$cd ignoretest/
[/tmp/client/ignoretest]$svn propset svn:ignore private .
property 'svn:ignore' set on '.'
[/tmp/client/ignoretest]$svn propget svn:ignore
private
[/tmp/client/ignoretest]$svn ci -m "ignore set"
Sending .
Not sure whether I have to do the commit here, in my understanding svn:ignore is a global recognized parameter setting it here means it is set for the central repository?
Committed revision 1.
[/tmp/client/ignoretest]$mkdir private
[/tmp/client/ignoretest]$echo 'secret' > private/file1.txt
[/tmp/client/ignoretest]$svn add *
A private
A private/file1.txt
[/tmp/client/ignoretest]$svn ci -m "something wrong?"
Adding private
Adding private/file1.txt
Transmitting file data .
Committed revision 2.
This does raise a red flag wih me
[/tmp/client/ignoretest]$mkdir ../../client2
[/tmp/client/ignoretest]$cd ../../client2
[/tmp/client2]$svn co file:///tmp/svnadmin/ignoretest
A ignoretest/private
A ignoretest/private/file1.txt
It is really checked in.
U ignoretest
Checked out revision 2.
Setting the ignore property doesn’t actually prevent you from adding files to the repository. It just stops svn from reporting those filenames when you run “svn status”.
If you’d run “svn status” after setting the ignore property you’d notice that “private” wasn’t displayed. However, there was nothing stopping you explicitly adding and committing it, as you did with “svn add *”.