views:

2485

answers:

4

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.

+3  A: 

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

abigagli
I'm looking for a solution that can be applied post merge operation
Eran Galperin
Ooops...Sorry, I didn't understand that... I think the easiest is a svn revert on the local copy after the merge has generated conflicts
abigagli
Actually there is no such option svn merge --accept..
Eran Galperin
Yes there is, in svn 1.5: http://subversion.tigris.org/svn_1.5_releasenotes.html#interactive-conflict-resolution
orip
Sorry, I'm using ver 1.0 so this doesn't help me
Eran Galperin
A: 

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

Will Dean
Yes I'm currently doing just that but it will take awhile to complete (around 100Mb repository). I was hoping for a command-line solution I could run on the server, and for future reference
Eran Galperin
+1  A: 

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.

Avi
The is no such option --accept for svn merge
Eran Galperin
This is a new option in SVN 1.5.
Avi
bummer for me.. :)
Eran Galperin
A: 

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

Peter Kahn