Browse Source

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>
maint
jcb91 11 years ago committed by Junio C Hamano
parent
commit
257ec841b8
  1. 2
      contrib/remote-helpers/git-remote-hg

2
contrib/remote-helpers/git-remote-hg

@ -537,7 +537,7 @@ def export_ref(repo, name, kind, head): @@ -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

Loading…
Cancel
Save