Commit Graph

12 Commits

Author SHA1 Message Date
Jun Wu
c12e300bb8 codemod: move Python packages to edenscm
Summary:
Move top-level Python packages `mercurial`, `hgext` and `hgdemandimport` to
a new top-level package `edenscm`. This allows the Python packages provided by
the upstream Mercurial to be installed side-by-side.

To maintain compatibility, `edenscm/` gets added to `sys.path` in
`mercurial/__init__.py`.

Reviewed By: phillco, ikostia

Differential Revision: D13853115

fbshipit-source-id: b296b0673dc54c61ef6a591ebc687057ff53b22e
2019-01-28 18:35:41 -08:00
Durham Goode
50b2838bd2 check-help: don't write to the repo root
Summary:
This test was writing files 'topic' and 'topic_filtered' into the hg
root directory. Let's write them to $TESTTMP instead

Reviewed By: phillco, quark-zju

Differential Revision: D9005934

fbshipit-source-id: fde38d2ff16245fd529f50bb3bd6631462ed1668
2018-07-25 16:37:18 -07:00
Phil Cohen
6b2b0e6969 tests: make test-check-help work on mac
Summary: The hgsubversion import is broken on macOS w/ system hg, so just remove it.

Reviewed By: quark-zju

Differential Revision: D8774878

fbshipit-source-id: 21250d9d871f376a645098d7fc47f17f46931964
2018-07-09 18:02:59 -07:00
Phil Cohen
9bdf1e57d1 tests: make test-check-help.t 2-3x as fast
Summary: This goes from 17s to 8.25s on my laptop, and 9.7s to 3.14s on my devserver.

Reviewed By: DurhamG

Differential Revision: D8753229

fbshipit-source-id: ce176dae0a2fb1aa10dd888b6cef223b953bf840
2018-07-06 17:27:25 -07:00
Jun Wu
c03c09633f test-check: use --cwd to avoid issues
Summary:
`test-check-help.t` could run `hg help` and that command shouldn't be affected
by the current repo requirement. So let's add `--cwd /`.

`helpers-testrepo.sh` uses `-R path` and that only works if path is the repo
root. It's not guarnateed now. So let's use `--cwd` instead.

Reviewed By: DurhamG

Differential Revision: D6879867

fbshipit-source-id: 0b40ab71acf7eb215834ce323fc16156da9afcd3
2018-04-13 21:51:01 -07:00
Mateusz Kwapich
f98fdd4963 hgsubversion: fix help test
Summary:
This test discovers what python files are available and ensures help
text is available. Since hgsubversion is now in the repo, we need to enable it
so `hg help subversion` works.

Test Plan: Ran the tests

Reviewers: singhsrb, #mercurial

Reviewed By: singhsrb

Differential Revision: https://phabricator.intern.facebook.com/D6698628

Signature: 6698628:1515629061:5cc01e14e6884010e76608f51dbc675d79374568
2018-01-10 16:20:37 -08:00
Yuya Nishihara
8f3fa790c1 tests: alias syshg and syshgenv so they can be switched conditionally 2017-07-02 13:14:20 +09:00
Adam Simpkins
55a457de69 tests: use the system hg for examining the local repository
Most test scripts use "hg" to interact with a temporary test repository.
However a few tests also want to run hg commands to interact with the local
repository containing the mercurial source code.  Notably, many of the
test-check-* tests want to check local files and commit messages.

These tests were previously using the version of hg being tested to query the
source repository.  However, this will fail if the source repository requires
extensions or other settings not supported by the version of mercurial being
tested.  The source repository was typically initially cloned using the system
hg installation, so we should use the system hg installation to query it.

There was already a helpers-testrepo.sh script designed to help cope with
different requirements for the source repository versus the test repositories.
However, it only handled the evolve extension.  This new behavior works with
any extensions that are different between the system installation and the test
installation.
2017-06-27 17:24:31 -07:00
Augie Fackler
e5d7bd82c5 cleanup: use $PYTHON to run python in many more tests
Spotted one of these, then wrote a check-code rule that caught them
all. It will be the next change.
2017-06-20 09:45:02 -04:00
Siddharth Agarwal
1ce1a31421 check: check modules in hgdemandimport
A few places only check modules in mercurial and hgext. Add
hgdemandimport to the list in those places.
2017-05-21 13:44:26 -07:00
Matt Harbison
5c542a74e6 test-check-help: fix to work on Windows
The initial problem was `hg files` prints paths with '\', which gets removed
when piped (scanhelptopics.py failed to open 'hgext__init__.py').  Then, xargs
was invoking `hg help` with 'backout\r (esc)', which setting binary mode
prevents.
2017-03-19 14:42:45 -04:00
Yuya Nishihara
e2db88af41 help: test if "hg help TOPIC" reference is valid
It's quite easy to make a reference invalid by mistake.
2017-01-25 22:39:17 +09:00