--- a/mercurial/merge.py Thu Jul 03 20:53:14 2008 -0700
+++ b/mercurial/merge.py Tue Jul 01 17:59:31 2008 +0100
@@ -258,6 +258,17 @@
return action
+def actioncmp(a1, a2):
+ m1 = a1[1]
+ m2 = a2[1]
+ if m1 == m2:
+ return cmp(a1, a2)
+ if m1 == 'r':
+ return -1
+ if m2 == 'r':
+ return 1
+ return cmp(a1, a2)
+
def applyupdates(repo, action, wctx, mctx):
"apply the merge action list to the working directory"
@@ -265,7 +276,7 @@
ms = mergestate(repo)
ms.reset(wctx.parents()[0].node())
moves = []
- action.sort()
+ action.sort(actioncmp)
# prescan for merges
for a in action: