remote-hg: avoid buggy strftime()

error on pull: fatal: Invalid raw date "" in ident: remote-hg <>

Neither %s nor %z are officially supported by python, they may work on
some (most?) platforms, but not all.

removed strftime use of %s and %z, which are not officially supported by python, with standard formats

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
jcb91 2013-12-07 07:09:40 -06:00 коммит произвёл Junio C Hamano
Родитель 077f43447c
Коммит 257ec841b8
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -537,7 +537,7 @@ def export_ref(repo, name, kind, head):
print "commit %s" % ref
print "mark :%d" % (note_mark)
print "committer remote-hg <> %s" % (ptime.strftime('%s %z'))
print "committer remote-hg <> %d %s" % (ptime.time(), gittz(ptime.timezone))
desc = "Notes for %s\n" % (name)
print "data %d" % (len(desc))
print desc