Resolve postponed conflicts with SVN
Asked Answered
S

2

25

I'm fairly new to SVN command line in a team environment. I accidentally postponed merging revisions. After doing:

svn status

I get:

?       Trivial/Trivial.xcodeproj/project.pbxproj.mine
?       Trivial/Trivial.xcodeproj/project.pbxproj.r280
?       Trivial/Trivial.xcodeproj/project.pbxproj.r276

However, I do not know how to merge these changes. Currently I'm getting an error with XCode saying the project cannot be parsed. Can someone show me how to merge these revisions?

Swanky answered 8/3, 2012 at 15:51 Comment(0)
U
30

Those files exist to help you run diffs or 3-way merges. The main version of the file will contain the conflicting code as well with markers surrounding the conflicts. So another option is to just edit the main file, search for those markers. Resolve the conflicts and remove the markers.

When done, you run a command like:

svn resolve --accept=working Trivial/Trivial.xcodeproj/project.pbxproj

This will remove those other files. You will also see that command includes options to resolve the conflict by simply accepting all the changes from one of those files.

See: http://svnbook.red-bean.com/en/1.7/svn.tour.cycle.html#svn.tour.cycle.resolve

Unwisdom answered 8/3, 2012 at 16:39 Comment(1)
When done editing, alternatively you can just use svn resolve and press (r) to mark resolved.Kwakiutl
B
12

In continuation of the accepted answer, these are the four options available while resolving:

svn resolve --accept=mine-full Trivial/Trivial.xcodeproj/project.pbxproj
svn resolve --accept=theirs-full Trivial/Trivial.xcodeproj/project.pbxproj
svn resolve --accept=base Trivial/Trivial.xcodeproj/project.pbxproj
svn resolve --accept=working Trivial/Trivial.xcodeproj/project.pbxproj

base: to choose the version of the file that you last checked out before making your edits

working: to pick and choose from your changes and the changes that your update fetched from the server, merge the conflicted text “by hand” (by examining and editing the conflict markers within the file)

I hope this helps further.

Blistery answered 19/3, 2014 at 9:57 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.