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

login
register
mail settings
Submitter Siddharth Agarwal
Date Nov. 17, 2015, 11:58 p.m.
Message ID <ab01cba6a601e2577932.1447804723@dev666.prn1.facebook.com>
Download mbox | patch
Permalink /patch/11448/
State Changes Requested
Headers show

Comments

Siddharth Agarwal - Nov. 17, 2015, 11:58 p.m.
# HG changeset patch
# User Siddharth Agarwal <sid0@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.

Patch

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