Subversion: prevent local modifications to one file from being committed?

前端 未结 13 655
名媛妹妹
名媛妹妹 2020-12-01 04:17

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

13条回答
  •  北海茫月
    2020-12-01 05:05

    Actually, a pre-commit script would do the job.

    Write a pre-commit script that executes 'svnlook diff' and rejects the commit if there is a property named 'nocommit' being set in the changeset.

    Then, in your working copy, you can just set a 'nocommit' property on any file that shouldn't be committed. Any subsequent commit will fail if any file has the 'nocommit' property. If you later do need to check in changes on the file, all you have to do is remove the 'nocommit' property from your working copy.

提交回复
热议问题