Thread (3 messages) flat view 3 messages, 2 authors, 2016-06-15

Re: [bug] remotes-hg: timezones are transformed

From: Felipe Contreras <hidden>
Date: 2016-06-15 22:58:18

Hi,

On Sat, Aug 3, 2013 at 11:36 AM, Jörn Hees [off-list ref] wrote:
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
Actually our version is the correct one:

% hg commit -m one -d "2012-04-28 11:28 +0200"
% hg export
# HG changeset patch
# User Felipe Contreras [off-list ref]
# Date 1335605280 -7200
#      Sat Apr 28 11:28:00 2012 +0200

-- 
Felipe Contreras
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help