bundlerepo: use revlog._checkhash
authorMads Kiilerich <madski@unity3d.com>
Wed, 16 Jan 2013 20:41:41 +0100
changeset 18417 610706715778
parent 18416 87f370c5fef5
child 18418 e72126135252
bundlerepo: use revlog._checkhash The error message will mention datafile instead of indexfile.
mercurial/bundlerepo.py
--- a/mercurial/bundlerepo.py	Wed Jan 16 20:41:41 2013 +0100
+++ b/mercurial/bundlerepo.py	Wed Jan 16 20:41:41 2013 +0100
@@ -130,11 +130,7 @@
             delta = self._chunk(chain.pop())
             text = mdiff.patches(text, [delta])
 
-        p1, p2 = self.parents(node)
-        if node != revlog.hash(text, p1, p2):
-            raise error.RevlogError(_("integrity check failed on %s:%d")
-                                     % (self.datafile, rev))
-
+        self._checkhash(text, node, rev)
         self._cache = (node, rev, text)
         return text