Remove unnecessary svn:mergeinfo properties

后端 未结 8 1725
甜味超标
甜味超标 2020-11-29 15:56

When I merge stuff in my repository Subversion wants to add/change a lot of svn:mergeinfo properties to files that are totally unrelated to the things that I wa

8条回答
  •  天涯浪人
    2020-11-29 16:01

    If you're sure you want to mass-remove mergeinfo properties, you can use the following BASH script.

    FILES=`svn status |grep "^ M      " |sed s/" M      "// |tr '\n', ' '`
    svn revert $FILES
    

    It gets a list of changed files, filters it to just mergeinfo only changes, strips everything but the actual file path, converts the one-per-line paths into a space delimited list, and the calls revert on that list.

提交回复
热议问题