[PATCH 1/4] remote-hg: avoid buggy strftime()
- From
Felipe Contreras <felipe.contreras@gmail.com>
- Date
- Dec 7, 2013, 13:09 UTC
- Message-ID
- <1386421783-27781-2-git-send-email-felipe.contreras@gmail.com>
- In-Reply-To
- <1386421783-27781-1-git-send-email-felipe.contreras@gmail.com>
From: jcb91 <joshuacookebarnes@gmail.com>
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> --- contrib/remote-helpers/git-remote-hg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/contrib/remote-helpers/git-remote-hg b/contrib/remote-helpers/git-remote-hg index c6026b9..a81d59e 100755 --- a/contrib/remote-helpers/git-remote-hg +++ b/contrib/remote-helpers/git-remote-hg @@ -538,7 +538,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
-- 1.8.4.2+fc1