Commit Graph

14 Commits

Author SHA1 Message Date
Skotch Vail
0db33b30c5 sparse: debugsparsematch accepts filesets
Summary: Use filesets so that we don't have to worry about exceeding command line

Reviewed By: quark-zju

Differential Revision: D23008329

fbshipit-source-id: bbfef9ecf23b810f4fa6ca8a6de1bbeb9330ae09
2020-08-14 09:46:32 -07:00
Skotch Vail
8780a3f66b sparse: debugsparsematch temp, multiple, exclude sparse profiles
Summary: This diff has a unit test to make sure on the fly sparse profiles work. We also allow for more than one sparse profile, and for multiple exclusion sparse profiles.

Reviewed By: quark-zju

Differential Revision: D23004062

fbshipit-source-id: 15f00401084c89a77d8e7bdd8c7eb688e20d131b
2020-08-14 09:46:32 -07:00
Durham Goode
4cc3731d03 py3: fix test-sparse-profiles.t
Summary: It now passes

Reviewed By: quark-zju

Differential Revision: D22653171

fbshipit-source-id: 1c59bb0ab0140f569bdd24f0c19f651041be2f9c
2020-07-22 19:00:42 -07:00
Jun Wu
4da3addbee tests: migrate off rev numbers for more tests
Summary:
Change by `fix-revnum.py`. Part of the tests using `hg debugstrip`,
which I'm trying to avoid.

Reviewed By: DurhamG

Differential Revision: D22240181

fbshipit-source-id: a569b712fe4b985378e5c61c000deecccefbc488
2020-07-06 14:04:28 -07:00
Jun Wu
9630ef4a4d sparse: add debugsparsematch to match paths against a given sparse profile
Summary:
This makes it possible to implement sparse profile based target determinator
cleanly. The old approach is to change `.hg/sparse` every time, and run
`hg log --sparse FILE`, which is hacky and less efficient.

Reviewed By: kulshrax

Differential Revision: D15798327

fbshipit-source-id: 5d46e5b2619f70a911324776b39829446e87b932
2020-06-25 18:03:20 -07:00
Andrey Tserkus
ddc889b30a add status field to sparse show output json format
Summary: Added the `status` field to json in order to provide that information to the automated client, as well as match similar output of `hg status`.

Reviewed By: quark-zju

Differential Revision: D21421494

fbshipit-source-id: 2a8b80068f2068b09930b90c43252003421b324e
2020-05-07 14:51:23 -07:00
Andrey Tserkus
2baf56cf50 hg sparse show should not abort on missing profiles
Summary: Fixed that `hg sparse show` failed on missing profiles. Added them to be shown in the output with "!" symbol and in cyan color - which matches output of deleted files in `hg status`.

Reviewed By: quark-zju

Differential Revision: D21419278

fbshipit-source-id: 5581e67774686a5240dceb9aac428fac3b1b73c2
2020-05-07 14:51:22 -07:00
Jun Wu
a7c7d37443 sparse: print warnings for sparse profile typos
Summary:
This makes it easier to spot typos.

The config sparse.missingwarning affects everytime a sparse profile is used.
In this case we just want to check at "enableprofile" time. So avoid using
that config option.

Reviewed By: DurhamG

Differential Revision: D20846313

fbshipit-source-id: 79f80d5e01abfe1633f2597074e9acb5cda60fec
2020-04-06 13:57:48 -07:00
Jun Wu
3ac689c81f context: do not print verbose KeyError context if the exception is handled
Summary:
Attach the content to the exception object directly so if the exception is
handled, no verbose message will be printed.

Reviewed By: DurhamG

Differential Revision: D19817404

fbshipit-source-id: 9b79952559d07eb62bd7eb2398c6dd022ffe7b28
2020-02-10 22:21:44 -08:00
Durham Goode
f77ea84dda tests: update sparse tests
Summary:
D19776181 added more details, which breaks the tests. Let's update the
tests

Reviewed By: quark-zju

Differential Revision: D19795728

fbshipit-source-id: 80f6a47da1dd12c5d092d1f6e798a6c43eb02311
2020-02-07 12:45:29 -08:00
Zeyi (Rice) Fan
92f6f35e7a mark all tests requiring Python 2
Summary:
This diff marks **ALL** mercurial tests requiring Python 2 feature.

After you fixes some tests, simply remove the `py2` feature requirement and that tests will be continuously run after your diff is landed.

To bypass this feature requirement, run the tests command with `HGTEST_FORCE_PY2=1`. For example:

```
HGTEST_FORCE_PY2=1 buck test //eden/scm/tests:hg_run_tests
```

or

```
HGTEST_FORCE_PY2=1 python run-tests.py
```

----

Basically this diff are created with the following commands:

```
$ sed -i 's/import feature\(.*\)$/import feature\1\n\nfeature.require(["py2"])/' test-*-t.py
$ sed -i '1s/^/#require py2\n/' test-*.t
$ ls | grep -P "^test.*(?<\!-t)\.py$" > list && vim -p $(cat list)
# manually adding feature requires for these Python tests.
```

(Note: this ignores all push blocking failures!)

ignore-conflict-markers

Reviewed By: singhsrb

Differential Revision: D19655148

fbshipit-source-id: 985e3ccb4010cc559049f1d89f8909bc2d9b5e20
2020-01-30 18:49:21 -08:00
Saurabh Singh
17ad617625 purge: move extension to core
Reviewed By: quark-zju

Differential Revision: D19506964

fbshipit-source-id: 173918346e90fadbaa52155786aa30fbd4951c8c
2020-01-21 20:49:08 -08:00
Jun Wu
75a8173a10 tests: enable chg for 572 tests
Summary:
Add `#chg-compatible` to 572 tests that seem to pass with chg enabled.
This should make them run faster.

Reviewed By: xavierd

Differential Revision: D18870507

fbshipit-source-id: fe895e733efffc9286cd3d17c7a156c803124395
2019-12-09 15:26:29 -08:00
Adam Simpkins
ab3a7cb21f Move fb-mercurial sources into an eden/scm subdirectory.
Summary:
In preparation for merging fb-mercurial sources to the Eden repository,
move everything from the top-level directory into an `eden/scm`
subdirectory.
2019-11-13 16:04:48 -08:00