Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/revlog.py @ 13276:ba6a63339f7c
revlog: pass rev to _checkhash
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Tue, 18 Jan 2011 15:55:48 -0600 |
parents | 68da048b4c88 |
children | 77351c88dd10 |
comparison
equal
deleted
inserted
replaced
13275:68da048b4c88 | 13276:ba6a63339f7c |
---|---|
869 text = self._chunk(base) | 869 text = self._chunk(base) |
870 | 870 |
871 bins = [self._chunk(r) for r in chain] | 871 bins = [self._chunk(r) for r in chain] |
872 text = mdiff.patches(text, bins) | 872 text = mdiff.patches(text, bins) |
873 | 873 |
874 text = self._checkhash(text, node) | 874 text = self._checkhash(text, node, rev) |
875 | 875 |
876 self._cache = (node, rev, text) | 876 self._cache = (node, rev, text) |
877 return text | 877 return text |
878 | 878 |
879 def _checkhash(self, text, node): | 879 def _checkhash(self, text, node, rev): |
880 p1, p2 = self.parents(node) | 880 p1, p2 = self.parents(node) |
881 if (node != hash(text, p1, p2) and | 881 if (node != hash(text, p1, p2) and |
882 not (self.flags(rev) & REVIDX_PUNCHED_FLAG)): | 882 not (self.flags(rev) & REVIDX_PUNCHED_FLAG)): |
883 raise RevlogError(_("integrity check failed on %s:%d") | 883 raise RevlogError(_("integrity check failed on %s:%d") |
884 % (self.indexfile, rev)) | 884 % (self.indexfile, rev)) |