changeset 5984:9451a941c536

convert: use 'unknown' and '0 0' if commit author or date weren't specified Closes issue873.
author Alexis S. L. Carvalho <alexis@cecm.usp.br>
date Sun, 03 Feb 2008 21:03:46 -0200
parents 6f1fcbc58efa
children 850494d62674
files hgext/convert/common.py hgext/convert/git.py
diffstat 2 files changed, 2 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/convert/common.py	Sun Feb 03 21:03:46 2008 -0200
+++ b/hgext/convert/common.py	Sun Feb 03 21:03:46 2008 -0200
@@ -22,8 +22,8 @@
 class commit(object):
     def __init__(self, author, date, desc, parents, branch=None, rev=None,
                  extra={}):
-        self.author = author
-        self.date = date
+        self.author = author or 'unknown'
+        self.date = date or '0 0'
         self.desc = desc
         self.parents = parents
         self.branch = branch
--- a/hgext/convert/git.py	Sun Feb 03 21:03:46 2008 -0200
+++ b/hgext/convert/git.py	Sun Feb 03 21:03:46 2008 -0200
@@ -99,7 +99,6 @@
         tzs, tzh, tzm = tz[-5:-4] + "1", tz[-4:-2], tz[-2:]
         tz = -int(tzs) * (int(tzh) * 3600 + int(tzm))
         date = tm + " " + str(tz)
-        author = author or "unknown"
 
         c = commit(parents=parents, date=date, author=author, desc=message,
                    rev=version)