changeset 18311:084074648755

localrepo: update the branchmap when destroying nodes This was previously called directly during strip. Moving it to destroying also means that it'll be called through _rollback, which seems harmless.
author Idan Kamara <idankk86@gmail.com>
date Sat, 05 Jan 2013 16:50:12 +0200
parents 4499ba5ac35c
children 7331ee72f99c
files mercurial/localrepo.py mercurial/repair.py
diffstat 2 files changed, 5 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/localrepo.py	Sat Dec 15 20:08:13 2012 +0200
+++ b/mercurial/localrepo.py	Sat Jan 05 16:50:12 2013 +0200
@@ -1391,7 +1391,10 @@
         changes to stay in memory (waiting for the next unlock), or vanish
         completely.
         '''
-        pass
+        # It simplifies the logic around updating the branchheads cache if we
+        # only have to consider the effect of the stripped revisions and not
+        # revisions missing because the cache is out-of-date.
+        branchmap.updatecache(self)
 
     @unfilteredmethod
     def destroyed(self, newheadnodes=None):
--- a/mercurial/repair.py	Sat Dec 15 20:08:13 2012 +0200
+++ b/mercurial/repair.py	Sat Jan 05 16:50:12 2013 +0200
@@ -6,7 +6,7 @@
 # This software may be used and distributed according to the terms of the
 # GNU General Public License version 2 or any later version.
 
-from mercurial import changegroup, branchmap
+from mercurial import changegroup
 from mercurial.node import short
 from mercurial.i18n import _
 import os
@@ -57,10 +57,6 @@
 
 def strip(ui, repo, nodelist, backup="all", topic='backup'):
     repo = repo.unfiltered()
-    # It simplifies the logic around updating the branchheads cache if we only
-    # have to consider the effect of the stripped revisions and not revisions
-    # missing because the cache is out-of-date.
-    branchmap.updatecache(repo)
     repo.destroying()
 
     cl = repo.changelog