Felipe Contreras
2313dc2ca0
readme: update
...
[no ci]
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com >
2022-08-05 02:58:51 -05:00
Felipe Contreras
0e52a6c883
check-versions: add last python2 combination
...
Mercurial 5.8 does keep working with python 2.7, but hggit 0.10.1
doesn't, and neither does dulwich 0.20.0.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com >
2022-08-05 02:22:33 -05:00
Felipe Contreras
e24a713dc9
check-versions: add hack for hg 5.7
...
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com >
2022-08-05 01:29:05 -05:00
Felipe Contreras
122b7f5da2
Remove annoying warning
...
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com >
2022-07-30 05:16:36 -05:00
Felipe Contreras
98c1c9263e
github: update hg versions
...
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com >
2022-07-30 04:23:14 -05:00
Felipe Contreras
85293dcf69
check-versions: add 2020 versions
...
Also, update the hggit patch for 0.9.0.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com >
2022-07-30 04:23:14 -05:00
Felipe Contreras
970883c46c
check-versions: add more versions
...
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com >
2022-07-30 01:25:14 -05:00
Felipe Contreras
ad77f125b7
travis: remove crap
...
No longer open.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com >
2022-07-30 01:25:14 -05:00
Felipe Contreras
5dcd6df3c8
github: cache check-versions stuff
...
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com >
2022-07-30 00:59:58 -05:00
Felipe Contreras
ed80437db4
github: use a matrix of hg versions
...
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com >
2022-07-30 00:48:57 -05:00
Felipe Contreras
0a1e8ecbc7
github: add simple workflow
...
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com >
2022-07-30 00:38:40 -05:00
Felipe Contreras
6d6504d1fd
test: fix for latest versions of git
...
Since git 2.34 the big push with force test is broken thanks to:
726a228dfb (fast-export: fix surprising behavior with --first-parent, 2021-12-16)
Since this only affects pushing multiple heads to the same branch, it
probably is not that important.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com >
2022-07-30 00:38:40 -05:00
Felipe Contreras
237ff083af
check-versions: update versions
...
These combinations seem to work.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com >
2022-07-30 00:19:44 -05:00
Felipe Contreras
0c8f8571c7
check-versions: update hggit url
...
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com >
2022-07-30 00:19:44 -05:00
Felipe Contreras
1442c29d39
check-versions: fix variable
...
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com >
2022-07-30 00:19:38 -05:00
Felipe Contreras
74d1aa14ac
gitrange(): general refactoring
...
To make the code more readable.
No functional changes.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com >
2019-06-20 14:39:36 -05:00
Felipe Contreras
1d85449b0b
gitrange(): always check negatives first
...
Also, always add the parents as negatives.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com >
2019-06-20 14:36:21 -05:00
Felipe Contreras
fe8b8c1a61
gitrange(): store parentrevs method
...
By calling the methods through a variable the code is significantly
faster.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com >
2019-06-20 14:36:07 -05:00
Felipe Contreras
510441bba9
gitrange(): add a == b check
...
Otherwise we return the whole repository. Thanks to the marks we don't
actually export it, but there's no need to return so many revs.
Reported-by: Mark Nauwelaerts <mnauw@users.sourceforge.net >
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com >
2019-06-20 14:35:45 -05:00
Mark Nauwelaerts
fa3484e08b
Find outgoing changesets earlier
...
This way we can find if we actually need to push something.
Recent versions of Mercurial already handle this correctly, but let's
check ourselves to make sure, and make it work with all versions.
Rewritten-by: Felipe Contreras <felipe.contreras@gmail.com >
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com >
2019-06-19 10:12:05 -05:00
Mark Nauwelaerts
d1544e2ccd
test: pushing a bookmark without changesets
...
This works in recent versions of Mercurial.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com >
2019-06-19 09:58:21 -05:00
Felipe Contreras
153a216f47
test: main: cleanup big push fetch first
...
In order to use setup_big_push().
No functional changes.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com >
2019-06-18 19:24:19 -05:00
Felipe Contreras
b3cdbe8e96
Allow --force --dry-run
...
No reason for it not to work.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com >
2019-06-18 18:50:52 -05:00
Felipe Contreras
d11509cab7
test: main: trivial cleanup
...
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com >
2019-06-18 18:45:03 -05:00
Felipe Contreras
4d01165b1b
test: main: fix check_push() bug
...
We were not checking the kind correctly. Add a new case switch to avoid
these issues.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com >
2019-06-18 18:18:00 -05:00
Felipe Contreras
a030d603ac
test: main: cleanup check_push()
...
Return immediately after a failure.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com >
2019-06-18 18:11:05 -05:00
Felipe Contreras
3d4a5a6d7e
Trivial cleanup
...
By adding a helper function the code is more understandable.
No functional changes.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com >
2019-06-18 15:22:09 -05:00
Felipe Contreras
7fb9d9b642
Load global UI confguration
...
Since 4.1 there's a separate function for that.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com >
2019-06-18 15:06:39 -05: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
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