Commit Graph

347 Commits

Author SHA1 Message Date
Felipe Contreras
33dccdfab0 Simplify get_filechanges
No functional changes.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2023-03-20 01:47:48 -06:00
Felipe Contreras
4ad9c8d70c Reorganize get_filechanges
So it's more extensible.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2023-03-20 01:44:31 -06:00
Felipe Contreras
740c681c1d Trivial style change
More idiomatic.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2023-03-20 01:39:33 -06:00
Felipe Contreras
995179444c Trivial simplification
When there's no parents the files are the same as the manifest.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2023-03-20 01:37:49 -06:00
Felipe Contreras
e6c479c136 Cleanup timezone stuff
No functional changes.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2023-03-14 04:10:54 -06:00
Felipe Contreras
b8b9a2f571 Use relative option to hg.share
When available.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2023-03-07 22:48:07 -06:00
Felipe Contreras
4c50223dba remote-hg: remove shared repo upgrade
We are not in 2013 anymore.

This reverts commit 8f9a87c (remote-hg: add shared repo upgrade,
2013-08-09).

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2023-03-07 22:47:53 -06:00
Felipe Contreras
35d32d5a75 Remove ancient marks upgrade path
It's safe to safe everyone already moved on since 2013.

This reverts d379f37 (remote-hg: upgrade version 1 marks, 2013-05-24).

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2023-03-07 21:49:05 -06:00
Felipe Contreras
7f6a843f0d github: add windows job
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2023-03-07 18:46:30 -06:00
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
f032d3617b Improve output writing
Let's avoid all python weirdness and just write directly.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2023-03-07 11:52:05 -06:00
Mark Nauwelaerts
60a1d7ae7a Fix for paths in Windows
Rewritten-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2023-03-07 11:52:05 -06:00
Felipe Contreras
10aec96d88 Simplify absolute path fix
This actually works on Windows.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2023-03-07 11:33:30 -06:00
Felipe Contreras
9916fead46 github: trivial update
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2023-03-06 15:40:44 -06:00
Felipe Contreras
bb663c032f github: use standard hg packages
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2023-03-06 15:40:44 -06:00
Felipe Contreras
9b54c626bc Remove support for hg < 4.0
2016 is ancient anyway.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2023-03-06 15:40:44 -06:00
Felipe Contreras
d51f508916 check-versions: trivial results cleanup 2023-03-06 15:40:44 -06:00
Felipe Contreras
09c4726083 check-versions: simplify for a single component
No need for all the extra complexity just for hg.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2023-03-06 15:40:44 -06:00
Felipe Contreras
b590aec106 check-versions: remove code for other tools
Only support hg.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2023-03-06 15:40:44 -06:00
Felipe Contreras
4496af4a5c check-versions: remove hg hack
It was only needed for hg-git tests.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2023-03-06 15:40:44 -06:00
Felipe Contreras
890080673b check-versions: remove hg-git stuff
It's not worth it to keep trying to run this.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2023-03-06 15:40:44 -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
7196dac02d Merge branch 'hg-git-revamp'
* hg-git-revamp:
  test: enable hg-git tests
  test: hg-git: trivial cleanup
  test: hg-git: general cleanup
  test: hg-git: fetch output from expected dir
  test: add expected output
  test: hg-git: add test_cmp_expected helper
  test: hg-git: add helper functions
  test: switch to bash
  test: hg-git: add main helper
  test: hg-git: simplify hg log filter
  test: relax hg-git checks
  test: hg-git: cleanup
2023-03-06 15:39:23 -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
b4c3277f72 github: trigger actions on all branches
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2023-03-06 09:42:51 -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
7394fc890e Simplify gitrange
The internal function for `a %% b` is marginally faster, and much
simpler.

Nowadays most versions of hg should have it.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2023-03-02 16:54:33 -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
5cd03ad0fd github: update python version
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2023-03-01 11:08:56 -06:00
Felipe Contreras
bf7ad934d7 check-versions: update
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2023-03-01 11:08:27 -06:00
Felipe Contreras
a5bc03d4d6 doc: use asdiidoctor
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2022-08-19 18:41:53 -05:00
Felipe Contreras
104e8895d6 doc: update and cleanup
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2022-08-19 18:37:24 -05:00
Felipe Contreras
30f31c13ce Skip close check for non-local branches
Apparently nowadays some remotes contain a bunch of topic branches which
are not pulled by default.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2022-08-10 23:53:45 -05:00
Felipe Contreras
485806e1e3 Dump data contents as-is
We don't care if it's valid utf-8 or not, just dump it.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2022-08-10 21:13:02 -05:00
Felipe Contreras
6e13c1c818 github: run tests with python3
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2022-08-08 00:33:10 -05:00
Felipe Contreras
ce38d52ce5 check-versions: add latest version
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2022-08-08 00:01:41 -05:00
Felipe Contreras
6b8ee2f1b6 check-versions: update version list
All these work with python3, and finally we are up-to-date.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2022-08-08 00:01:41 -05:00