How can I force subversion to commit an unchanged file?

后端 未结 11 1098
孤街浪徒
孤街浪徒 2020-12-02 16:32

I want subversion to commit a file even if it\'s unchanged. Is there a way to do this?

11条回答
  •  眼角桃花
    2020-12-02 17:22

    If you want the file contents to remain unchanged (meaning that you can't merely change whitespace as johnstok suggested) you can always change one of the properties on the file.

    eg.

    svn propset dummyproperty 1 yourfile
    svn commit yourfile
    

    That will perform a commit without having to change the file.

    Just make sure that you don't use one of the special svn: properties. Anything else should be ok.


    Edit: A number of other posters have asked why someone would want to do this - presumably the people who have marked this answer down have also had the same concerns.

    I can't speak for the original poster, but one scenario where I have seen this used is when attempting to automatically synchronise activities on a Visual Sourcesafe repository with a subversion repository.

提交回复
热议问题