summaryrefslogtreecommitdiff
path: root/hgext/convert/darcs.py
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@baserock.org>2011-10-01 20:49:36 +0000
committerLorry <lorry@roadtrain.codethink.co.uk>2012-09-27 13:27:51 +0000
commit921ced43c48c1d170452a7b251b94cc96ec8dd44 (patch)
tree3c4a89176ea67fe4c7bf7b375488361a823c95fa /hgext/convert/darcs.py
parent9039c805b0a7e36220101323f82735f08a104b37 (diff)
downloadmercurial-tarball-master.tar.gz
Imported from /srv/lorry/lorry-area/mercurial-tarball/mercurial-1.9.3.tar.gz.HEADmercurial-1.9.3master
Diffstat (limited to 'hgext/convert/darcs.py')
-rw-r--r--hgext/convert/darcs.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/hgext/convert/darcs.py b/hgext/convert/darcs.py
index b10a533..38d79ba 100644
--- a/hgext/convert/darcs.py
+++ b/hgext/convert/darcs.py
@@ -24,7 +24,7 @@ except ImportError:
try:
from elementtree.ElementTree import ElementTree, XMLParser
except ImportError:
- pass
+ ElementTree = None
class darcs_source(converter_source, commandline):
def __init__(self, ui, path, rev=None):
@@ -42,7 +42,7 @@ class darcs_source(converter_source, commandline):
raise util.Abort(_('darcs version 2.1 or newer needed (found %r)') %
version)
- if "ElementTree" not in globals():
+ if ElementTree is None:
raise util.Abort(_("Python ElementTree module is not available"))
self.path = os.path.realpath(path)
@@ -139,7 +139,7 @@ class darcs_source(converter_source, commandline):
# etree can return unicode objects for name, comment, and author,
# so recode() is used to ensure str objects are emitted.
return commit(author=self.recode(elt.get('author')),
- date=util.datestr(date, '%Y-%m-%d %H:%M:%S %1%2'),
+ date=util.datestr(date),
desc=self.recode(desc).strip(),
parents=self.parents[rev])