obscache: move an assert to a lower level
authorPierre-Yves David <pierre-yves.david@octobus.net>
Fri, 12 May 2017 19:05:46 +0200
changeset 2355 078549a71ce4
parent 2354 fed22455e510
child 2356 d5de0529a48f
obscache: move an assert to a lower level
hgext3rd/evolve/obscache.py
--- a/hgext3rd/evolve/obscache.py	Fri May 12 19:04:13 2017 +0200
+++ b/hgext3rd/evolve/obscache.py	Fri May 12 19:05:46 2017 +0200
@@ -287,7 +287,6 @@
 
         if revs:
             self._updaterevs(repo, revs)
-            assert len(self._data) == len(cl), (len(self._data), len(cl))
         if obsmarkers:
             self._updatemarkers(repo, obsmarkers)
 
@@ -330,6 +329,8 @@
             else:
                 val = 0
             self._data.append(val)
+        cl = repo.changelog
+        assert len(self._data) == len(cl), (len(self._data), len(cl))
 
     def _updatemarkers(self, repo, obsmarkers):
         """update the cache with new markers"""