Mark Nauwelaerts
b60eb47173
Merge commit 'fad59f' into felipec
...
These changes can be merged with limited to none conflict resolution.
2020-06-01 12:52:41 +02:00
Mark Nauwelaerts
76162ce148
Merge commit '4d33' into felipec
...
These changes are unattributed ports of existing fixes and can as such
mostly be discarded.
2020-06-01 11:53:36 +02:00
Mark Nauwelaerts
7ae03f7640
Merge commit '5cc27' into felipec
...
These changes can be merged with limited to none conflict resolution.
2020-06-01 11:38:52 +02:00
Mark Nauwelaerts
95da53badd
test: adjust push force to push mode behavior
2020-06-01 11:12:50 +02:00
Mark Nauwelaerts
a0608664ca
Remove commented remnant
2020-06-01 11:12:34 +02:00
David Turner
9d6d135855
fix race fix on local repos
2019-08-03 21:23:51 +02:00
David Turner
60a6c7b36d
Fix a race condition
...
If new heads are created on a remote http repo after we pull but
before we request branch heads, we'll try to read a head that we don't
actually have locally. To fix this, we request the branchmap before
fetching, and only fetch the heads that we just learned about.
2019-07-22 21:22:09 +02:00
Felipe Contreras
fad59f53eb
Refactor timezone functions
...
Split them into hours and minutes, and use divmod() to make them more
readable.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com >
2019-06-05 03:17:39 -05:00
Oliver Stueker
e17e147fb1
Fix timezone issue with negative offsets
...
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 >
2019-06-05 03:12:47 -05:00
Felipe Contreras
4878023a8b
Add helper for hg timezone
...
No functional changes.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com >
2019-06-04 15:30:38 -05:00
Oliver Stueker
0dfae24d21
test: add test for issue with negative offsets
...
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com >
2019-06-04 15:30:36 -05:00
Felipe Contreras
c7dbb5612b
Add timezone bidirectionality test
...
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 >
2019-06-04 15:28:35 -05:00
Felipe Contreras
cc4e5659d9
Merge branch 'check-versions'
...
* check-versions:
travis: use check-versions tool
check-versions: add hack for hg-git 0.8.x
Add tool to run tests on many versions
2019-06-04 04:02:38 -05:00
Felipe Contreras
2c993b3433
travis: use check-versions tool
...
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com >
2019-06-04 04:02:12 -05:00
Felipe Contreras
4944a384cd
check-versions: add hack for hg-git 0.8.x
...
They made a mistake and broke bidirectionality when debugextrainmessage
is used.
The upstream report:
https://bitbucket.org/durin42/hg-git/issues/281/
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com >
2019-06-04 04:02:12 -05:00
Felipe Contreras
f29c42c645
Add tool to run tests on many versions
...
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com >
2019-06-04 04:02:12 -05:00
Felipe Contreras
7b7c65f72d
README: remove old limitations
...
They work now.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com >
2019-06-04 04:02:06 -05:00
Felipe Contreras
cee3ed7c00
travis: add pip cache
...
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com >
2019-06-04 00:56:41 -05:00
Felipe Contreras
01c9a981c7
travis: install latest released version of hg
...
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com >
2019-06-04 00:18:18 -05:00
Felipe Contreras
d0a5888580
travis: update Mercurial versions
...
And general cleanups.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com >
2019-06-04 00:12:47 -05:00
Felipe Contreras
a5dfc9025b
test: mark a regression in Git
...
The issue is reported, and a proposed fix has been sent:
https://marc.info/?l=git&m=155961441427321
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com >
2019-06-03 21:32:05 -05:00
Felipe Contreras
4d337cff06
Don't catch all exceptions in export_ref()
...
Just in case.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com >
2019-06-03 20:23:18 -05:00
Felipe Contreras
5cc271ef18
test: hggit: add simple file rename test
...
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 >
2019-06-03 20:23:18 -05:00
Felipe Contreras
c8fff2cd06
Use changelog.isancestorrev()
...
The old changelog.descendant() is deprecated in 4.7, gone in 4.8.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com >
2019-06-03 20:23:18 -05:00
Felipe Contreras
c95fba3c18
Don't call repo[tag] directly
...
Deprecated in 4.6, gone in 4.7.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com >
2019-06-03 20:23:18 -05:00
Felipe Contreras
aaef56a2a3
Use marks.applychange()
...
Since 4.3 bookmarks are updated with applychanges() and since 4.6
anything else is deprecated.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com >
2019-06-03 20:23:18 -05:00
Felipe Contreras
a16c69a99c
Refactor updatebookmarks()
...
Also, use the proper lock, even for older versions.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com >
2019-06-03 20:23:18 -05:00
Felipe Contreras
00e95fd8df
Call node.rev() instead of int(node)
...
The int(node) method has been removed in 4.6.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com >
2019-06-03 20:23:18 -05:00
Felipe Contreras
5bf7aad6e3
Fix memfilectx() params
...
These changed again in 4.5.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com >
2019-06-03 20:23:18 -05:00
Felipe Contreras
9b8e0ec2c0
Refactor memfilectx() method
...
It's getting hairy.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com >
2019-06-03 20:23:18 -05:00
Felipe Contreras
b309562574
Use makechangegroup()
...
Since 4.4 we have yet another way to push revisions.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com >
2019-06-03 20:23:18 -05:00
Felipe Contreras
e25d3d78cd
Use repo.vfs() instead of repo.opener()
...
The method() opener has been a link to vfs() since a long time, and it's
now removed in 4.3.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com >
2019-06-03 20:23:18 -05:00
Felipe Contreras
ed5a70706a
Fix getchangegroup() for 4.0
...
The arguments heads and common have been removed.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com >
2019-06-03 20:23:18 -05:00
Felipe Contreras
0faf2c9189
Tell hg-git to be backwards compatible
...
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 >
2019-06-03 19:54:48 -05:00
Felipe Contreras
ada49422a7
test: add test for annotated tags
...
So we make sure they keep working as expected.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com >
2019-06-03 19:54:39 -05:00
Felipe Contreras
580cea0d31
Explicitly process tags
...
Normally tag commands come with a corresponding ref, but not since
Git v2.21.
It's not clear if Git's change is correct, but fix it our end anyway.
fdf31b6369 (fast-export: ensure we export requested refs)
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com >
2019-06-03 19:51:38 -05:00
Felipe Contreras
1f376e437f
Revert "test: skip tests with broken hg-git compatibility"
...
We need to fix the compatibility.
This reverts commit 29a0d8a0e3 .
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com >
2019-06-03 19:51:35 -05:00
Felipe Contreras
4108665799
Add version check for filelog creation
...
The functions are only present in 3.2. Older versions don't need this
code.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com >
2019-06-03 19:49:54 -05:00
Felipe Contreras
fc28115a53
Avoid ManifestLookupError
...
In versions older than 2.6 ManifestLookupError doesn't exist.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com >
2019-06-03 19:49:08 -05:00
Felipe Contreras
e3009683f8
test: add missing &&s
...
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com >
2019-06-03 14:55:25 -05:00
Felipe Contreras
54cec85f94
test: update expected result
...
It seems these work since Git v2.0.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com >
2019-06-03 14:55:20 -05:00
Felipe Contreras
5ad322c54d
Merge branch 'sharness-output-dir'
...
* sharness-output-dir:
test: sharness: add support for output directory
2019-06-03 14:54:51 -05:00
Felipe Contreras
13bbc8a342
test: sharness: add support for output directory
...
I don't know why this was removed from Git's version.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com >
2019-06-03 14:54:44 -05:00
Felipe Contreras
673b50d3f4
test: update to sharness 1.1
...
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com >
2019-06-03 14:54:29 -05:00
Mark Nauwelaerts
35ecb45fda
Tweak hg to git ref name translation
...
Fixes mnauw/git-remote-hg#26
2019-05-19 13:01:59 +02:00
Mark Nauwelaerts
1456e68129
Really strip prefix to ensure a valid package version
2019-04-28 14:32:42 +02:00
Mark Nauwelaerts
de95133416
Release v1.0.1
v1.0.1
2019-04-27 15:08:20 +02:00
Mark Nauwelaerts
e0b752be8f
Move release version management to make stage
...
... to ensure setup.py does not trip some later time.
Fixes mnauw/git-remote-hg#25
2019-04-27 15:08:20 +02:00
native-api
f050de1bcc
Additional installation step in Windows
...
fixes https://github.com/mnauw/git-remote-hg/issues/23
2019-03-19 20:41:21 +01:00
Mark Nauwelaerts
0bf3db826b
Handle platform dependency in atomic file renaming
2019-01-06 15:51:42 +01:00