Felipe Contreras
63cf2780ba
test: fixes for Windows
...
It's not clear if these tests can't work, or don't work at the moment,
but at least some seem to be the fault of hg, not us.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com >
2023-03-07 18:45:17 -06:00
Felipe Contreras
5e6ef0a1d5
test: properly check for mercurial
...
We want to fail if it's not present, not skip the tests.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com >
2023-03-06 15:40:44 -06:00
Felipe Contreras
a1e2c4acc9
test: remove pointless prereq checks
...
The prereq check was necessary in upstream git, not here where it's a
noop.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com >
2023-03-06 15:40:44 -06:00
Felipe Contreras
a8bb2a28a3
test: enable hg-git tests
...
They have been working for a long time but the standard packages needed
to be patched with check-versions to run them successfully.
Now that the expected output is stored we don't need to patch anything
and they can just be run.
This reverts commit b022367aef .
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com >
2023-03-06 15:18:53 -06:00
Felipe Contreras
ffcb41cc52
test: hg-git: trivial cleanup
...
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com >
2023-03-06 15:18:53 -06:00
Felipe Contreras
9949745533
test: hg-git: general cleanup
...
Now that we don't have to run hg-git the code is much simpler.
No functional changes.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com >
2023-03-06 15:18:52 -06:00
Felipe Contreras
83620648ab
test: hg-git: fetch output from expected dir
...
So we don't actually have to run hg-git every time (it's broken most of
the time anyway).
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com >
2023-03-06 15:09:02 -06:00
Felipe Contreras
30a2d61bdf
test: add expected output
...
Generated with: hg:6.3 hggit:1.0.1 dulwich:0.20.50
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com >
2023-03-06 15:09:02 -06:00
Felipe Contreras
2fdb786fc4
test: hg-git: add test_cmp_expected helper
...
No functional changes.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com >
2023-03-06 15:09:02 -06:00
Felipe Contreras
79797918ff
test: hg-git: add helper functions
...
It's tedious to do almost exactly the same thing over and over.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com >
2023-03-06 15:09:02 -06:00
Felipe Contreras
d45d5cde50
test: switch to bash
...
We are using some bash-specific tricks.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com >
2023-03-06 15:09:02 -06:00
Felipe Contreras
7078666c77
test: hg-git: add main helper
...
Simplifies current code and will be useful later.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com >
2023-03-06 09:55:03 -06:00
Felipe Contreras
08e453f8db
test: hg-git: simplify hg log filter
...
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com >
2023-03-06 09:55:03 -06:00
Felipe Contreras
ec7119d0ef
test: relax hg-git checks
...
We don't care about the revision number of the commits, only the
topology.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com >
2023-03-06 09:55:03 -06:00
Felipe Contreras
6ae5e3961e
test: hg-git: cleanup
...
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com >
2023-03-06 09:55:03 -06:00
Felipe Contreras
de9bf35388
test: include sharness properly
...
So that it can be overridden.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com >
2023-03-05 22:40:09 -06:00
Felipe Contreras
857d68708b
test: trivial cleanups
...
TEST_DIRECTORY doesn't even exist in sharness.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com >
2023-03-05 22:32:27 -06:00
Felipe Contreras
22229dd738
Only report success after successful push
...
Otherwise git core will update the namespaced refs, and show success to
the user, even in the case of a crash.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com >
2023-03-01 11:38:29 -06:00
Felipe Contreras
b3b9b5de39
Enable python3 support
...
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com >
2022-08-08 00:01:41 -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
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
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
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
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
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
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
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
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
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
Felipe Contreras
b022367aef
test: temporarily disable hg-git tests
...
They work, but they need too many changes in different packages.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com >
2016-05-16 22:29:50 -05:00
Felipe Contreras
18626d346f
Revert "test: use C.UTF-8 locale in tests"
...
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 >
2016-05-16 22:29:50 -05:00
Felipe Contreras
185852eac4
test: cleanup hg-git test
...
We don't need hgext.bookmarks since a long long time (ever).
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com >
2014-06-03 06:00:02 -05:00
Felipe Contreras
29a0d8a0e3
test: skip tests with broken hg-git compatibility
...
https://bitbucket.org/durin42/hg-git/issue/115/
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com >
2014-06-02 18:42:17 -05:00
Paul Wise
22d9794c11
test: add compatibility with Debian hg-git package
...
Debian has named the hggit python module as hgext.git.
Signed-off-by: Paul Wise <pabs3@bonedaddy.net >
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com >
2014-05-30 17:37:01 -05:00
Paul Wise
f53a8653ab
test: use C.UTF-8 locale in tests
...
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 >
2014-05-30 17:37:01 -05:00
Felipe Contreras
fadd5f698b
test: improve test locations
...
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com >
2014-05-22 22:09:28 -05:00
Felipe Contreras
5b6d5283cb
Use python2 instead of python
...
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com >
2014-05-09 09:11:14 -05:00
Felipe Contreras
5738ee42d8
test: add missing redirection
...
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com >
2014-05-09 09:10:57 -05:00
Felipe Contreras
259838a342
test: fix redirection style
...
To be sane, a redirection operation has to have spaces, like any binary
operand: 'a > b'.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com >
2014-05-09 08:55:51 -05:00
Felipe Contreras
55bbd81a75
test: trivial style cleanups
...
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com >
2014-05-09 08:49:30 -05:00
Felipe Contreras
bbc4009acf
test: trivial cleanups and fixes
...
There was a broken && chain, and cat is simpler than echo in a subshell.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com >
2014-05-09 08:43:07 -05:00