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

login
register
mail settings
Submitter Siddharth Agarwal
Date Feb. 10, 2013, 4:57 p.m.
Message ID <fad0293bfdb045488c2b.1360515455@sid0x220>
Download mbox | patch
Permalink /patch/938/
State Superseded
Commit d9ff580fcaa26199ab8d76f35f81169431ce84b3
Headers show

Comments

Siddharth Agarwal - Feb. 10, 2013, 4:57 p.m.
# HG changeset patch
# User Siddharth Agarwal <sid0@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.

Patch

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):