Mercurial > hg-stable
comparison mercurial/revlog.py @ 11996:3195cf01dfb9
revlog.revision(): don't use nullrev as the default value for the cache
I is probably a bug if the deltachain computation think there was a cache hit
at nullrev. Use None instead, this will never trigger a cache hit.
author | Benoit Boissinot <benoit.boissinot@ens-lyon.org> |
---|---|
date | Fri, 20 Aug 2010 00:17:50 +0200 |
parents | ff84cd2bdfaf |
children | 6d29171255cd |
comparison
equal
deleted
inserted
replaced
11995:ff84cd2bdfaf | 11996:3195cf01dfb9 |
---|---|
1054 return mdiff.textdiff(self.revision(self.node(rev1)), | 1054 return mdiff.textdiff(self.revision(self.node(rev1)), |
1055 self.revision(self.node(rev2))) | 1055 self.revision(self.node(rev2))) |
1056 | 1056 |
1057 def revision(self, node): | 1057 def revision(self, node): |
1058 """return an uncompressed revision of a given node""" | 1058 """return an uncompressed revision of a given node""" |
1059 cachedrev = nullrev | 1059 cachedrev = None |
1060 if node == nullid: | 1060 if node == nullid: |
1061 return "" | 1061 return "" |
1062 if self._cache: | 1062 if self._cache: |
1063 if self._cache[0] == node: | 1063 if self._cache[0] == node: |
1064 return self._cache[2] | 1064 return self._cache[2] |