Question

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.

Was it helpful?

Solution

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

OTHER TIPS

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.

svn --version
svn, version 1.6.17 (r1128011)

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

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...

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top