Page 1 of 1

Problems with 'Ignore'

PostPosted: Thu Dec 17, 2009 1:35 pm
by yellowswordfish
1 - I have a single code file that needs to be in the repository and working copy. But, when the local copy changes should NOT alter the repository version. In other words I need SVN to ignore the changes and protect the repository version.
2 - Having said that - at some point I may need to update the repository version so some sort of override would be useful.

When I first added the file in the working copy and went to commit my new code I marked the file as 'svn:ignore'. Made the commit. But the new file did not get placed into the repository. (I read here that only unversioned files can be set to ignore). So now the file is NOT in the repository and any attempt to add it again fails.

I guess the first question is - can I undo the ignore setting which clearly was the wrong command to use.
And the second question is - is it possible to achieve what I need to achieve in 1 and - hopefully 2 above?


Re: Problems with 'Ignore'

PostPosted: Thu Dec 17, 2009 2:28 pm
by Florin

For the first question, you can undo the ignore setting. For this, select the parent folder of that file and after that look in the Properties view. There should be a svn:ignore property having as value the name of your file or an expression that matches the name of your file. You should select that property and remove it by pressing the red X button in the view's toolbar. After this, you should be able to see the file in your working copy marked with a '?' icon, meaning that it is unversioned. To make him versioned, use the Add... option from the file's contextual menu. Now you would be able to commit it on the repository, but pay attention that now there is no solution for your problem.

For the second question, there is nothing that can be done about it. SVN does not offer such type of support. Neither Syncro SVN Client, but I've added an issue on our internal issues tracker to add filtering support in our application. The only thing you can do is when committing to be very careful not to commit that file (to not send modifications to the repository), and when updating to be very careful not to update that file (to not override your work with the modifications incoming from repository).

On the moment when we will have a solution implemented for your problem we will notify you about his availability.

Best regards,
Florin Avram
Syncro SVN Client

Re: Problems with 'Ignore'

PostPosted: Thu Dec 17, 2009 2:41 pm
by yellowswordfish
Thank you Florin

First part perfectly explained and I feel stupid for not looking in the folder props. That at least gets me out of the hole I dug for myself!

On your suggestion of a filter on the client end - that would be a great addition. Actually perfect. I will look forward to that some time in the future.

Until that time I will try out the 'lock' option. At least this will prevent other devs committing their copy of the file in question.

Again - many thanks - and appreciate the speed of response as well.


Re: Problems with 'Ignore'

PostPosted: Thu Dec 17, 2009 2:57 pm
by Florin
Hello Andy,

I'm glad that helped you. I want to warn you about the SVN locking system. Be aware that SVN allows breaking and stealing the locks put by others on some resources, thus there is no warranty that the files will not be modified on the repository.
You can read more about locking on the following page, and especially read the "Lock Communication" section. That should help you more. ... cking.html

Best Regards,

Re: Problems with 'Ignore'

PostPosted: Thu Dec 17, 2009 3:48 pm
by yellowswordfish
Thanks for the link and the warning.
it's not a perfect solution but will do the trick for now - only 2 devs on this.