Mercurial > public > mercurial-scm > hg
comparison mercurial/revlog.py @ 11997:6d29171255cd
revlog.revision(): remove debug code
author | Benoit Boissinot <benoit.boissinot@ens-lyon.org> |
---|---|
date | Fri, 20 Aug 2010 00:17:50 +0200 |
parents | 3195cf01dfb9 |
children | e789a811c21d |
comparison
equal
deleted
inserted
replaced
11996:3195cf01dfb9 | 11997:6d29171255cd |
---|---|
20 _pack = struct.pack | 20 _pack = struct.pack |
21 _unpack = struct.unpack | 21 _unpack = struct.unpack |
22 _compress = zlib.compress | 22 _compress = zlib.compress |
23 _decompress = zlib.decompress | 23 _decompress = zlib.decompress |
24 _sha = util.sha1 | 24 _sha = util.sha1 |
25 | |
26 _cached, _uncached = 0, 0 | |
27 | 25 |
28 # revlog header flags | 26 # revlog header flags |
29 REVLOGV0 = 0 | 27 REVLOGV0 = 0 |
30 REVLOGNG = 1 | 28 REVLOGNG = 1 |
31 REVLOGNGINLINEDATA = (1 << 16) | 29 REVLOGNGINLINEDATA = (1 << 16) |
1077 # build delta chain | 1075 # build delta chain |
1078 self._loadindex(base, rev + 1) | 1076 self._loadindex(base, rev + 1) |
1079 cachehit, base, chain = self.deltachain(rev, cachedrev) | 1077 cachehit, base, chain = self.deltachain(rev, cachedrev) |
1080 | 1078 |
1081 # do we have useful data cached? | 1079 # do we have useful data cached? |
1082 if cachehit and self._cache: | 1080 if cachehit: |
1083 global _cached | |
1084 _cached += 1 | |
1085 text = self._cache[2] | 1081 text = self._cache[2] |
1086 else: | |
1087 global _uncached | |
1088 _uncached += 1 | |
1089 | |
1090 | 1082 |
1091 # drop cache to save memory | 1083 # drop cache to save memory |
1092 self._cache = None | 1084 self._cache = None |
1093 | 1085 |
1094 self._chunkraw(base, rev) | 1086 self._chunkraw(base, rev) |