[PATCH 5 of 6 mergedriver] localrepo: switch to mergestate.fresh()

Siddharth Agarwal sid0 at fb.com
Tue Nov 17 17:58:43 CST 2015


# HG changeset patch
# User Siddharth Agarwal <sid0 at fb.com>
# Date 1447797175 28800
#      Tue Nov 17 13:52:55 2015 -0800
# Node ID ab01cba6a601e2577932731559f83cbb11d400b0
# Parent  071c1dffd74e5412b9e6bca877b0029d6dc9c54a
localrepo: switch to mergestate.fresh()

See the previous patches for why we're doing this.

diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py
--- a/mercurial/localrepo.py
+++ b/mercurial/localrepo.py
@@ -1168,8 +1168,7 @@ class localrepository(object):
             else:
                 ui.status(_('working directory now based on '
                             'revision %d\n') % parents)
-            ms = mergemod.mergestate(self)
-            ms.reset(self['.'].node())
+            mergemod.mergestate.fresh(self, self['.'].node())
 
         # TODO: if we know which new heads may result from this rollback, pass
         # them to destroy(), which will prevent the branchhead cache from being


More information about the Mercurial-devel mailing list