Summary:
Converts test-hgsql-filenames.t to be a -t.py test and converts the
hgsql test infra to work in -t.py tests.
Reviewed By: quark-zju
Differential Revision: D17611277
fbshipit-source-id: 8c75ad01a6af743e912312bdc603529dd0f2cf4b
Summary:
This just moves things around. So native and pure Python modules are split to
different Python packages. This makes it possible to use the standard zip
importer without hacks (ex. `hgdemandimport/embeddedimport`).
This diff is mostly about moving things. While `make local` still works,
it does break nupkg build, which will be fixed in a later diff.
Reviewed By: kulshrax
Differential Revision: D15798642
fbshipit-source-id: 5d83f17099aa198df0acd5b7a99667e2f35fe7b4
Summary: We want to have just one entry point to Mercurial, namely the Rust binary. Getting rid of the `hg` Python script means that we finally can do things that only exist in Rust and not in Python.
Reviewed By: simpkins
Differential Revision: D13186374
fbshipit-source-id: f3c8cfe4beb7bf764172a8af04fd25202eca9af2
Summary:
Those are treated differently in eden or git vs ripgrep's ignore crate.
Tracking issue: https://github.com/BurntSushi/ripgrep/issues/1183
Change the gitignore rule to ignore `{}` patterns to solve the issue.
Reviewed By: sfilipco
Differential Revision: D13924426
fbshipit-source-id: 910bfff159509f2840ddcd4b4351577629228257
Summary:
D13853115 adds `edenscm/` to `sys.path` and code still uses `import mercurial`.
That has nasty problems if both `import mercurial` and
`import edenscm.mercurial` are used, because Python would think `mercurial.foo`
and `edenscm.mercurial.foo` are different modules so code like
`try: ... except mercurial.error.Foo: ...`, or `isinstance(x, mercurial.foo.Bar)`
would fail to handle the `edenscm.mercurial` version. There are also some
module-level states (ex. `extensions._extensions`) that would cause trouble if
they have multiple versions in a single process.
Change imports to use the `edenscm` so ideally the `mercurial` is no longer
imported at all. Add checks in extensions.py to catch unexpected extensions
importing modules from the old (wrong) locations when running tests.
Reviewed By: phillco
Differential Revision: D13868981
fbshipit-source-id: f4e2513766957fd81d85407994f7521a08e4de48
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
Summary:
In order to be able to run `chg` from the main `hg.rust` binary, we decided
that we will turn it into a static lib. This diff teaches our current build
scripts to do this.
Reviewed By: quark-zju
Differential Revision: D10853906
fbshipit-source-id: 8e0f37aa7e52d4a0610f36d7903eb0a318c193ad
Summary:
This relies on adding chef's unix toolchain to the PATH rather than copying stuff from LFS.
Plus, this sets the `HGDEV` env var, which causes `exec\hgmain\src\hgenv.rs` to load
environment from `build\env`. Thus, we don't need to copy `build\hg\hg-python` to the repo dir.
Reviewed By: quark-zju
Differential Revision: D9559617
fbshipit-source-id: de70b262d81befffc651ee82dd5f5e7e0a9c6ed3
Summary:
MSYS provides binaries that tests need so we no longer
depend on system binaries, which might be broken.
MSYS can provide `make.exe` to make `make local` working,
so we don't depend on other things to provide `make`.
As we're here, change `run-tests.py` to use the right Python
interpreter and escape Windows paths.
Reviewed By: phillco
Differential Revision: D9505926
fbshipit-source-id: f17e77dfc599069d4fe849057b7a198758c2dd42
Summary:
This causes `make local` to build the new binary, copy the result into the
`.../hg` dir and rename it into `hg.rust` (while `hgmain` seems like a good
crate name, it seems like the binary should be called `hg.rust`, at least for
now)
Reviewed By: quark-zju
Differential Revision: D9218057
fbshipit-source-id: 49a0e09ae78b8cdb64c7158da3bb4179a47d4af9
Summary:
I cloned the GitHub export and found it does not build. It's easy to fix so
let's do so.
Reviewed By: phillco
Differential Revision: D8772772
fbshipit-source-id: 8e86576175270b541c03803e7357a3f76d29e25a
Summary:
They cause a lot of churn when updating vendored crates. It's unnecessary to
check them in because the vendored crates basically pinned versions of all
dependencies.
Also clean up .gitignore, since it does not support "syntax:re".
Reviewed By: DurhamG
Differential Revision: D7562533
fbshipit-source-id: b9fcade6f38c0652a1b19ac4f90827dac7eed181
Summary:
There are tests in fb/tests we don't run as part of the test suite. Update the makefile and add buck infrastructure to run them.
- Update the test-common-commands-hg.t test
- Re-generate the fbcode/.hgignore file from the updated .gitignore
Reviewed By: quark-zju
Differential Revision: D7584511
fbshipit-source-id: d85800dccf0eb569a68db4b9e1d9796e3d7ac957
Summary:
Currently, the `build_deb.py` writes the packages to the directory
from which the script was invoked. This leads to issues in integrating with our
continuous build setup. Therefore, this commit changes the script to write to a
known location.
Reviewed By: quark-zju
Differential Revision: D7511832
fbshipit-source-id: 85beaf37e92418cae932fd81c72065cf5d64c249
Summary:
Make `library.sh` read `$HGTEST_GETDB_PATH` for `getdb.sh` location. Unify
`getdb.sh` used by infinitepush and hgsql into one.
Reviewed By: ryanmce
Differential Revision: D6974635
fbshipit-source-id: 55bcebfbdaca7f43fb0cfca0d3e089e76cf9f24e
Summary:
This is a resend of https://phab.mercurial-scm.org/D1430, without breaking
Windows.
I encountered "too many opened files" problem due to treemanifest packs on my
laptop. This patch seems to be the easiest solution without side effects. Other
choices are deleting files (seem like an non-ideal workaround), forcing a
repack (could be slow), and rewriting using Rust (could take too long).
The root cause is Python's `mmap` implementation has to keep a fd internally
to support `mmapobj.resize` API. We only need read-only operation on the
mmap object so the fd is unnecessary. Re-implement a minimal mmap interface
for this purpose.
Reviewed By: DurhamG
Differential Revision: D6835890
fbshipit-source-id: 74c429e957cb8677682604eb02fc38b5b8d13ef7