How can I resolve all SVN conflicts automatically? (Windows CLI)

纵然是瞬间 提交于 2019-12-08 21:01:14

问题


I'm trying to automate some Subversion processes and I'm running into problems with conflicts. When I merge two branches, sometimes I get tree conflicts and regular (text) conflicts. I'd like to be able to resolve everything using the repository copy:

svn resolve . -R --accept theirs-full

but if there are tree conflicts, it yells at me and says I have to resolve them to the working state.

svn: warning: Tree conflicts can only be resolved to 'working' state; 'file' not resolved

Is there an easy way to resolve just the tree conflicts to 'working' so that I can then continue to resolve the text conflicts with theirs-full? Or maybe another way to accomplish my goal entirely? I'm looking to do this through the Windows command line. Thanks!


Subversion server is version 1.6.6

I'm using CollabNet Subversion Command-Line Client v1.6.13 (for Windows)


回答1:


Did you check this SO post?




回答2:


Simple solution/workaround:

svn st | grep "^C" | sed "s/^........//" | xargs svn resolve -R --accept=theirs-full

than just resolve tree conflicts to wc:

svn resolve -R --accept=working

Not very nice, just works.



来源:https://stackoverflow.com/questions/3962570/how-can-i-resolve-all-svn-conflicts-automatically-windows-cli

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!