How are you using svnmerge for merging and branching in svn?
Specifically I ask because I have started using svnmerge
to track a specific branch in a project I work on. I did svnmerge merge and ended up with lots of strange files like .merge-left
, .merge-right
, .working
. Now, I want to see how others use it to end up learning how I can revert my changes and apply a merge the best proper way.
If you are seing the merge-left/right/working files then it means that there's been a conflict in a merge you've tried to apply. This means that the same section of code has been changed in different ways on the source branch (the branch you've merged from) and the destination branch (the branch you're merging to).
- 'file.py.merge-left.rxxx` shows the merging result taking the left side of the conflict
- 'file.py.merge-right.ryyy` shows the merging result taking the right side of the conflict
- 'file.py.working` shows your unchanged working copy
- 'file.py` shows SVNs attempts to merge both
See the SVN Book for more information on conflicts. To resolve them you need to look at the left and right files and work out how best to combine the conflicting changes. If you have an SVN GUI such as TortoiseSVN or SmartSVN then you should be able to open the client's conflict viewer. I'd highly recommend that over trying to do it from the raw text files. If you're an emacs user than ediff
is great for resolving conflicts too.
Once you're happy with the change then you need to mark the file as 'resolved' in SVN, which allows you to check the file in.
来源:https://stackoverflow.com/questions/1673658/svnmerge-workflow