Skip to content

Commit 257ec84

Browse files
jcb91gitster
authored andcommitted
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>
1 parent 077f434 commit 257ec84

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

contrib/remote-helpers/git-remote-hg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -537,7 +537,7 @@ def export_ref(repo, name, kind, head):
537537

538538
print "commit %s" % ref
539539
print "mark :%d" % (note_mark)
540-
print "committer remote-hg <> %s" % (ptime.strftime('%s %z'))
540+
print "committer remote-hg <> %d %s" % (ptime.time(), gittz(ptime.timezone))
541541
desc = "Notes for %s\n" % (name)
542542
print "data %d" % (len(desc))
543543
print desc

0 commit comments

Comments
 (0)