mercurial/localrepo.py
changeset 39301 5763216ba311
parent 39298 7a9f15ed3b96
child 39312 9198e41df6ef
--- a/mercurial/localrepo.py	Sat Aug 25 15:19:43 2018 +0900
+++ b/mercurial/localrepo.py	Sat Aug 25 15:28:48 2018 +0900
@@ -1393,7 +1393,7 @@
                                      releasefn=releasefn,
                                      checkambigfiles=_cachedfiles,
                                      name=desc)
-        tr.changes['revs'] = pycompat.xrange(0, 0)
+        tr.changes['origrepolen'] = len(self)
         tr.changes['obsmarkers'] = set()
         tr.changes['phases'] = {}
         tr.changes['bookmarks'] = {}
@@ -1611,7 +1611,7 @@
             # later call to `destroyed` will refresh them.
             return
 
-        if tr is None or tr.changes['revs']:
+        if tr is None or tr.changes['origrepolen'] < len(self):
             # updating the unfiltered branchmap should refresh all the others,
             self.ui.debug('updating the branch cache\n')
             branchmap.updatecache(self.filtered('served'))