The current code miscalculates the time-zone offsets for time zones that don't
have a full-hour offset and are located west of UTC (e.g. St. John's,
Newfoundland).
Basically it's caused because 33 // 10 == 3, but -33 // 10 != -3.
Take the example of St. John's (-0330). The correct integer timezone should be
3.5 * 3600 (12600), however, since we are not checking for negative module
arithmetic, instead of calculating the timezone for (-3, -30), we are doing it
for (-4, 70), which would be OK... if we had hours of 100 minutes:
-4 * 100 + 70 = -330
We could fix the code to use proper negative arithmetic (mod -100), but why
bother with the extra complexity? Let's just use absolute numbers and fix the
sign later.
This fixes issue #48.
Commit message written by Felipe Contreras.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Oliver Stueker pointed out correctly that there is an issue with the way
we handle negative timestamps that don't have a full hour offset.
This test shows that.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
The Hg-Git project has put a lot of emphasis on file renaming, better
check for that explicitly, even though we are already testing that.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Since version 0.7.0 hg-git stores extra information directly into the
commits, we don't support that, so we need to tell hg-git to do what it
always did: put the extra data in the message.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
This reverts commit f53a8653ab.
It turns out Debian and Fedora do provide the C.UTF-8 locale, but other
distributions don't.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
The en_US.UTF-8 locale is not guaranteed to exist, and if it doesn't,
several tests fail.
Signed-off-by: Paul Wise <pabs3@bonedaddy.net>
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Inspired by the tests in gitifyhg.
One test is failing, but that's because of a limitation of
remote-helpers.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Mercurial can have bookmarks pointing to "nullid" (the empty root
revision), while Git can not have references to it.
Warn the user about the invalid reference, and do not advertise these
bookmarks as head refs, but otherwise continue the import. In
particular, we still keep track of the fact that the remote repository
has a bookmark of the given name, in case the user wants to modify that
bookmark.
Reported-by: Antoine Pelisse <apelisse@gmail.com>
Signed-off-by: Max Horn <max@quendi.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>