--- a/hgext3rd/evolve/stablerange.py Wed Mar 22 05:36:45 2017 +0100
+++ b/hgext3rd/evolve/stablerange.py Wed Mar 22 05:44:39 2017 +0100
@@ -9,7 +9,6 @@
import collections
import math
-import hashlib
from mercurial import (
commands,
@@ -24,7 +23,6 @@
from . import (
exthelper,
- obsolete,
)
eh = exthelper.exthelper()
@@ -387,39 +385,6 @@
def subranges(self):
return self._repo.stablerange.subranges(self._repo, self)
- @util.propertycache
- def obshash(self):
- cache = self._repo.obsstore.rangeobshashcache
- obshash = cache.get(self)
- if obshash is not None:
- return obshash
- pieces = []
- nullid = nodemod.nullid
- if len(self) == 1:
- tmarkers = self._repo.obsstore.relevantmarkers([self.node])
- pieces = []
- for m in tmarkers:
- mbin = obsolete._fm1encodeonemarker(m)
- pieces.append(mbin)
- pieces.sort()
- else:
- for subrange in self.subranges():
- obshash = subrange.obshash
- if obshash != nullid:
- pieces.append(obshash)
-
- sha = hashlib.sha1()
- # note: if there is only one subrange with actual data, we'll just
- # reuse the same hash.
- if not pieces:
- obshash = nodemod.nullid
- elif len(pieces) != 1 or obshash is None:
- sha = hashlib.sha1()
- for p in pieces:
- sha.update(p)
- obshash = cache[self] = sha.digest()
- return obshash
-
@eh.reposetup
def setupcache(ui, repo):