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

前端 未结 13 714
名媛妹妹
名媛妹妹 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 04:54

    Lock certainly isn't what you want, and I don't think any of the built in features will do it for you.

    Depending on which environment you are working in, I'd write a script that:

    1. Gets the list of files
    2. Removes the ones I don't want to commit
    3. Commits the files

    Something along the lines of:

    svn status | grep ^M | grep -v exclude.c | awk -F' ' '{print $2}' | xargs svn ci -m "I'm committing something"
    

    Or if the list of files is really static, just fix the list!

提交回复
热议问题