# HG changeset patch # User Renato Cunha # Date 1281208371 10800 # Node ID 69e0bcf369614f5c36e244872f0f8ca709036a6a # Parent 8b03c988efb35616018bbcf43f9d87d053548567 manifest: removed usage of the global cmp function Py3k doesn't have a global cmp() function, making this call problematic in the py3k port. Also, calling cmp() here is not necessary, since we only want to know if the two values are equal. A check for equality perfect in this case and this patch does that. diff -r 8b03c988efb3 -r 69e0bcf36961 mercurial/manifest.py --- a/mercurial/manifest.py Sat Aug 07 15:38:05 2010 +0200 +++ b/mercurial/manifest.py Sat Aug 07 16:12:51 2010 -0300 @@ -84,7 +84,7 @@ hi = start end = advance(lo, '\0') found = m[lo:end] - if cmp(s, found) == 0: + if s == found: # we know that after the null there are 40 bytes of sha1 end = advance(end + 40, '\n') return (lo, end + 1)