diff -r 39b916b1d8e4 -r 142b5d5ec9cc mercurial/revlog.py --- a/mercurial/revlog.py Sat Aug 27 12:00:12 2005 -0700 +++ b/mercurial/revlog.py Sat Aug 27 14:21:25 2005 -0700 @@ -12,10 +12,7 @@ import zlib, struct, sha, binascii, heapq from mercurial import mdiff - -def hex(node): return binascii.hexlify(node) -def bin(node): return binascii.unhexlify(node) -def short(node): return hex(node[:6]) +from node import * def compress(text): """ generate a possibly-compressed representation of text """ @@ -38,21 +35,6 @@ if t == 'u': return bin[1:] raise RevlogError("unknown compression type %s" % t) -def hash(text, p1, p2): - """generate a hash from the given text and its parent hashes - - This hash combines both the current file contents and its history - in a manner that makes it easy to distinguish nodes with the same - content in the revision graph. - """ - l = [p1, p2] - l.sort() - s = sha.new(l[0]) - s.update(l[1]) - s.update(text) - return s.digest() - -nullid = "\0" * 20 indexformat = ">4l20s20s20s" class lazyparser: