parsedate: allow '' for epoch
authorMatt Mackall <mpm@selenic.com>
Wed, 06 Dec 2006 13:13:27 -0600
changeset 3807 e43b48f0f718
parent 3806 92a3532a01d9
child 3808 d6529582942a
parsedate: allow '' for epoch
mercurial/util.py
--- a/mercurial/util.py	Wed Dec 06 13:13:26 2006 -0600
+++ b/mercurial/util.py	Wed Dec 06 13:13:27 2006 -0600
@@ -1066,6 +1066,8 @@
     """parse a localized time string and return a (unixtime, offset) tuple.
     The date may be a "unixtime offset" string or in one of the specified
     formats."""
+    if not string:
+        return 0, 0
     if not formats:
         formats = defaultdateformats
     try: