# HG changeset patch # User mpm@selenic.com # Date 2005-05-21 01:36:02 # Node ID 2ac722ad1a9dc163580dda51762e44b2502fa2be # Parent e484cd5ec2827f1572156a845ef38c8881ff181a Make revision code slightly faster diff --git a/mercurial/revlog.py b/mercurial/revlog.py --- a/mercurial/revlog.py +++ b/mercurial/revlog.py @@ -194,9 +194,9 @@ class revlog: text = None rev = self.rev(node) - base = self.base(rev) - start = self.start(base) - end = self.end(rev) + start, length, base, link, p1, p2, node = self.index[rev] + end = start + length + if base != rev: start = self.start(base) if self.cache and self.cache[1] >= base and self.cache[1] < rev: base = self.cache[1] @@ -220,7 +220,6 @@ class revlog: text = mdiff.patches(text, bins) - (p1, p2) = self.parents(node) if node != hash(text, p1, p2): raise IOError("integrity check failed on %s:%d" % (self.datafile, rev))