# HG changeset patch # User Matt Mackall # Date 2009-05-18 22:36:24 # Node ID 90f86a5330bbbcd075c792cd14fb6bb47b8ccd2c # Parent 51b7d2a68e03b17ff8e6820b24362afe7847e474 commit: tidy up mergestate slightly diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py --- a/mercurial/localrepo.py +++ b/mercurial/localrepo.py @@ -809,16 +809,15 @@ class localrepository(repo.repository): 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