Skip to content

Commit

Permalink
remote-hg: avoid buggy strftime()
Browse files Browse the repository at this point in the history
  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>
  • Loading branch information
jcb91 authored and Junio C Hamano committed Dec 9, 2013
1 parent 077f434 commit 257ec84
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion contrib/remote-helpers/git-remote-hg
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 257ec84

Please sign in to comment.