diff tests/test-archive @ 8296:908c5906091b

util: remove md5 This hash function is broken and should not be used by new code. It is currently only used by keepalive.
author Martin Geisler <mg@lazybytes.net>
date Mon, 04 May 2009 21:30:39 +0200
parents 0c2ba48415c8
children 58edd448da4f
line wrap: on
line diff
--- a/tests/test-archive	Mon May 04 20:29:05 2009 +0200
+++ b/tests/test-archive	Mon May 04 21:30:39 2009 +0200
@@ -75,7 +75,10 @@
 gzip -dc test-$QTIP.tar.gz | tar tf - 2>/dev/null | sed "s/$QTIP/TIP/"
 
 cat > md5comp.py <<EOF
-from mercurial.util import md5
+try:
+    from hashlib import md5
+except ImportError:
+    from md5 import md5
 import sys
 f1, f2 = sys.argv[1:3]
 h1 = md5(file(f1, 'rb').read()).hexdigest()