remote-hg: use hashlib instead of hg sha1 util
authorFelipe Contreras <felipe.contreras@gmail.com>
Fri, 26 Apr 2013 21:12:35 +0000 (26 16:12 -0500)
committerJunio C Hamano <gitster@pobox.com>
Fri, 26 Apr 2013 22:20:27 +0000 (26 15:20 -0700)
To be in sync with remote-bzr.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
contrib/remote-helpers/git-remote-hg

index 80b3606..06920f2 100755 (executable)
@@ -22,7 +22,7 @@ import shutil
 import subprocess
 import urllib
 import atexit
-import urlparse
+import urlparse, hashlib
 
 #
 # If you want to switch to hg-git compatibility mode:
@@ -933,7 +933,7 @@ def main(args):
 
     if alias[4:] == url:
         is_tmp = True
-        alias = util.sha1(alias).hexdigest()
+        alias = hashlib.sha1(alias).hexdigest()
     else:
         is_tmp = False