I have a Subversion working copy where I made some local modifications to one file. The modifications are only relevant to me, I do not want to commit them. (The version in the repository contains some default values which are suitable for the other users, just not for me, which is why I want to override them locally.)
Note that although I do not want to commit my changes, I do want to receive any updates made in the repository when I do svn update
. Also, it is only in my working copy that I do not want to commit the changes to that file, the other users should not be affected. So svn:ignore
or commit hooks do not fit my purpose.
Currently, I simply do:
svn commit file1 file2...
where I specify explicitly the files that have changes excluding the particular file that I do not want to commit.
However, while I'm working, I have the habit of simply writing:
svn commit -m "Log of what I just did"
and I fear that I will inadvertently commit the "forbidden" file by using the above command at a moment when I'm not attentive.
In short, what I'm looking for is simply a way of "marking" a file in a working copy which prevents Subversion from committing the changes in that file (it doesn't have to be automatic exclusion, even if I just get an error when I try to commit all files, it is fine). Sort of like marking files in a "conflict" state…
Does such a thing exist?
Update: akent, thanks for pointing out this very similar question.
Best Answer
There have been a few answers that can work:
CoverosGene suggested that the default commands such as
svn commit
operate on a default changelist, such that you can exclude a file if you assign it to another changelist, but I can't find any reference of that in the documentation, and in my testing this does not work.Since there is no good solution for the SVN command-line client, I've opened an enhancement request here. The request suggests that the command-line client could also honor the "ignore-on-commit" changelist.
Update: This is now issue 2858 and there is a feature outline to handle it with an
svn:hold
property.