[PATCH 2 of 3 V2] merge: run _forgetremoved after manifestmerge

Siddharth Agarwal sid0 at fb.com
Sun Feb 10 10:57:35 CST 2013


# HG changeset patch
# User Siddharth Agarwal <sid0 at fb.com>
# Date 1360498606 0
# Node ID fad0293bfdb045488c2b65b6448da54628ada8e5
# Parent  f068418a1e6c8ece794a6f0ef7c1c1008eca7a44
merge: run _forgetremoved after manifestmerge

_forgetremoved can trigger manifest construction, but we only want it to
happen after manifestmerge, so that our attempt to read the manifests in the
right order in an upcoming patch actually works.

diff --git a/mercurial/merge.py b/mercurial/merge.py
--- a/mercurial/merge.py
+++ b/mercurial/merge.py
@@ -515,12 +515,12 @@ def calculateupdates(repo, tctx, mctx, a
             _checkcollision(mctx, None)
         else:
             _checkcollision(mctx, (tctx, ancestor))
-    if tctx.rev() is None:
-        actions += _forgetremoved(tctx, mctx, branchmerge)
     actions += manifestmerge(repo, tctx, mctx,
                              ancestor,
                              branchmerge, force,
                              partial)
+    if tctx.rev() is None:
+        actions += _forgetremoved(tctx, mctx, branchmerge)
     return actions
 
 def recordupdates(repo, actions, branchmerge):


More information about the Mercurial-devel mailing list