git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[bug] remotes-hg: timezones are transformed

From
Jörn Hees <dev@joernhees.de>
Date
Aug 3, 2013, 16:36 UTC
Message-ID
<EDA1C92E-6872-40D5-8C25-89C3FFF62F7A@joernhees.de>
Hi,

it seems that if you use the 1.8.3.4 remote-helpers/git-remote-hg to clone a mercurial repo the timezone information of commits gets transformed into your current timezone. (command: git clone hg::…)

I noticed this when a colleague in another timezone used Kiln to also export the same mercurial repo that i had cloned from git before. Fetching from his git repo gives me a "second root tree" with all commits duplicated. A git show of two equivalent commit reveals that the Date: line of the commits changed. Tracking this back into the original mercurial repo reveals that _his_ times are correct.

This will also make two or more clones from different timezones all using the same hg remote repo incompatible!

Example: Original mercurial commit (timezone: -7200 = -4h) https://bitbucket.org/lipis/gae-init/commits/a43078f90e727a13767cf14c740157763fb423b5/raw/

Lipis git export via Kiln: (-4h) https://github.com/lipis/gae-init/commit/36b7cabf03fbba784cc41b63430433e9fc79ca8c

My export via git clone hg::ssh://hg@bitbucket.org/lipis/gae-init (+2h) https://github.com/joernhees/git-hg-remote-bug_gae-init/commit/8341bf10f1f0a7a924717a8a2c1770f61acd51ae

Expected would be that the hashes of both git exports are the same. His are correct as far as i can tell.

Cheers, Jörn

Next: Felipe Contreras
Message 1 of 3 in “[bug] remotes-hg: timezones are transformed”
  1. Jörn HeesAug 3, 2013
  2. Felipe ContrerasAug 3, 2013
  3. Jörn HeesAug 4, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.