changeset 11763:69e0bcf36961

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.
author Renato Cunha <renatoc@gmail.com>
date Sat, 07 Aug 2010 16:12:51 -0300
parents 8b03c988efb3
children 16723af520b0
files mercurial/manifest.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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)