Resolving SVN merge postponed conflicts recursively

岁酱吖の 提交于 2020-01-23 07:55:29

问题


I have a dev branch that hasn't been touched for a while. I merged the trunk into it to integrate many fixes/changes in the main line since it was branched out, but now I have many small conflicts (merge-left/merge-right).

I want the latest trunk revision to be used to resolve each conflict. Is there a command I can run that will resolve all conflicts under a working copy in one direction automatically (merge-right should be used for all conflicts)?

EDIT: As indicated in the comments, I tried reverting and then running svn merge with the --accept option, only apparently there is no such option in SVN 1.0. Still looking for a solution.


回答1:


I think you can use the "--accept theirs-full" option when you issue the svn merge command. That should do what you want...




回答2:


Like abigagly said, you should use --accept theirs-full when doing the merge. If you have already done the merge and want to start over, you can use svn revert -R first, to start over.

The --accept option is new in SVN 1.5, along with interactive merge support.




回答3:


svn --version
svn, version 1.6.17 (r1128011)

svn resolve -R --accept='theirs-full' <path>



回答4:


I think TSVN could do this if you do a "Check for modifications", which will show you all the files including the conflicted ones, select them all, and then choose 'resolve using theirs'.

Not sure if TSVN is relevant for your platform, or it that's actually exactly what you want to to do, but it might be helpful...




回答5:


Ok, I have a plan and I think it explains most of my woes - (harvested from my post to users@subversion...)

I think we hit the following problems that made things worse:

  • cherry pick merges + merges at levels below root (all are allowed, but they can make later merges more complex)
  • we assumed merge command completion meant all changes merged (didn't double check with mergeinfo --show-revs eligible)
  • possible bugs with earlier clients (1.5 or early 1.6). We have many ubuntu and debian systems and were unware of wandisco's update site initially. So, we missed out on the easy way to stay current. We are now rapidly deploying 1.6.11

PUSH process:

  1. svn merge --reintegrate --accept postpone URL-branch path-to-workspace
  2. svn mergeinfo URL-branch path-to-workspace --show-revs eligible > eligible_revs.txt
  3. repeat until nothing left that's eligable

PULL process: same pattern, but minus the --reintegrate



来源:https://stackoverflow.com/questions/328730/resolving-svn-merge-postponed-conflicts-recursively

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