commit: tidy up mergestate slightly
authorMatt Mackall <mpm@selenic.com>
Mon, 18 May 2009 17:36:24 -0500
changeset 8503 90f86a5330bb
parent 8502 51b7d2a68e03
child 8513 b9308af35ba2
commit: tidy up mergestate slightly
mercurial/localrepo.py
--- a/mercurial/localrepo.py	Mon May 18 17:36:24 2009 -0500
+++ b/mercurial/localrepo.py	Mon May 18 17:36:24 2009 -0500
@@ -809,16 +809,15 @@
             if editor:
                 wctx._text = editor(self, wctx,
                                     changes[1], changes[0], changes[2])
+            ret = self.commitctx(wctx, True)
 
-            ret = self.commitctx(wctx, True)
-            ms.reset()
-
-            # update dirstate
+            # update dirstate and mergestate
             for f in changes[0] + changes[1]:
                 self.dirstate.normal(f)
             for f in changes[2]:
                 self.dirstate.forget(f)
             self.dirstate.setparents(ret)
+            ms.reset()
 
             return ret