mercurial/util.py
branchstable
changeset 15390 fffe49886a51
parent 15358 a347b3614bae
child 15392 d7bfbc92a1c0
--- a/mercurial/util.py	Mon Oct 31 14:22:11 2011 -0500
+++ b/mercurial/util.py	Mon Oct 31 14:22:11 2011 -0500
@@ -73,14 +73,14 @@
 
 # Python compatibility
 
-def sha1(s):
+def sha1(s=''):
     return _fastsha1(s)
 
 _notset = object()
 def safehasattr(thing, attr):
     return getattr(thing, attr, _notset) is not _notset
 
-def _fastsha1(s):
+def _fastsha1(s=''):
     # This function will import sha1 from hashlib or sha (whichever is
     # available) and overwrite itself with it on the first call.
     # Subsequent calls will go directly to the imported function.