# HG changeset patch # User Matt Mackall # Date 1409051513 -7200 # Node ID 4092d12ba18a10e71a55759d48b2ce097a0ad196 # Parent 7eef5a87ce3ff761711c69526bf422fdc2dc696d repoview: fix 0L with pack/unpack for 2.4 diff -r 7eef5a87ce3f -r 4092d12ba18a mercurial/repoview.py --- a/mercurial/repoview.py Fri Aug 22 16:40:34 2014 -0400 +++ b/mercurial/repoview.py Tue Aug 26 13:11:53 2014 +0200 @@ -68,7 +68,8 @@ it to the cache. Upon reading we can easily validate by checking the hash against the stored one and discard the cache in case the hashes don't match. """ - h = util.sha1(''.join(repo.heads())) + h = util.sha1() + h.update(''.join(repo.heads())) h.update(str(hash(frozenset(hideable)))) return h.digest() @@ -88,7 +89,7 @@ # write cache to file newhash = cachehash(repo, hideable) sortedset = sorted(hidden) - data = struct.pack('>%iI' % len(sortedset), *sortedset) + data = struct.pack('>%ii' % len(sortedset), *sortedset) fh = repo.vfs.open(cachefile, 'w+b', atomictemp=True) fh.write(struct.pack(">H", cacheversion)) fh.write(newhash) @@ -116,7 +117,7 @@ # cache is valid, so we can start reading the hidden revs data = fh.read() count = len(data) / 4 - hidden = frozenset(struct.unpack('>%iI' % count, data)) + hidden = frozenset(struct.unpack('>%ii' % count, data)) return hidden finally: if fh: diff -r 7eef5a87ce3f -r 4092d12ba18a mercurial/revlog.py --- a/mercurial/revlog.py Fri Aug 22 16:40:34 2014 -0400 +++ b/mercurial/revlog.py Tue Aug 26 13:11:53 2014 +0200 @@ -306,6 +306,8 @@ def rev(self, node): try: return self._nodecache[node] + except TypeError: + raise except RevlogError: # parsers.c radix tree lookup failed raise LookupError(node, self.indexfile, _('no node'))