Summary:
The 'f' utility is used in a couple of tests.
Provide it in hg test environment.
Reviewed By: DurhamG
Differential Revision: D34835699
fbshipit-source-id: 8de65f653fccf3717ab5c0d9a45dee6936bb645d
Summary: pyfmt it so changes can be formatted too.
Reviewed By: DurhamG
Differential Revision: D34835691
fbshipit-source-id: 97e31c5e0b514ec6651cb8e670473535db2a6802
Summary:
For some reason, the `hg up tip` triggers a ssh server and hangs
if run by debugruntest. Let's skip it with debugruntest for now.
Reviewed By: DurhamG
Differential Revision: D34835690
fbshipit-source-id: 18b3c2a875f825022a0f4c1d3d36bc947a196721
Summary:
This is used by hg to decide the path to the "hg" binary. Without this, `hg`
will just use `argv[0]` for its binary path, which is okay if `hg` installed
but problematic when running tests where the hg binary is `hg.sh` that has
extra logic before `exec`-ing the `hg_rust` binary.
In theory we could also use `HG_REAL_BIN` but that's a telemetry wrapper
concept not existed in stock hg.
This fixes the `HgPrefetch.test` because D34835693 (f42faf1c64) made it run `util.hgcmd()`
directly - without `HGEXECUTABLEPATH`, it runs the `hg_rust` without
`PYTHONPATH` set and crash.
Reviewed By: chadaustin
Differential Revision: D35860447
fbshipit-source-id: 9abbd64327c50ef351ff05f99bbf1da3f8740332
Summary: This makes it pass with debugruntest.
Reviewed By: DurhamG
Differential Revision: D34835686
fbshipit-source-id: 4f0c087fdfe9e3464412ecf5be5556b40f67da8b
Summary: `tee` is used by some tests. Implement it.
Reviewed By: DurhamG
Differential Revision: D34790217
fbshipit-source-id: 7f62bde41da5520c158889ac09b659f7e7b47ba5
Summary:
One of the problem of autofix is it rewrites "(glob)" lines with non-glob
version. Let's try to make it smarter to preserve the "(glob)" lines.
Reviewed By: DurhamG
Differential Revision: D34790206
fbshipit-source-id: 0bb14f8569a55393165c8fe579f09d43aa98f0bc
Summary:
"with foo:" is valid Python code. Use "With" to make it a comment.
This makes the test pass with debugruntest.
Reviewed By: DurhamG
Differential Revision: D34790214
fbshipit-source-id: cab47466af306731d23476c6562eaf743d990781
Summary: This makes it run under debugruntest.
Reviewed By: DurhamG
Differential Revision: D34790203
fbshipit-source-id: 034995f0c36bf0ef014d83a2d215819b8792752c
Summary:
`sh foobar.sh` is commonly used in tests as HGEDITOR or something. Implement
it.
Reviewed By: DurhamG
Differential Revision: D34790210
fbshipit-source-id: 5a16e6ddde7c9943330aa7f2ab894409977e5bb9
Summary:
Python stdlib doctest is conceptually similar to what debugruntest
does - run code, check output. By adopting it in debugruntest,
we get the handy autofix feature for free, which is very handy
for files like `testing/t/transform.py`.
The Python doctest requires a Python module as the "starting point".
`doctest:<module name>` is added as a special syntax to indicate
this is a doctest.
A special case is added for edenscm/ source code. Python files will
automatically turn into doctest for convenience.
Reviewed By: DurhamG
Differential Revision: D34725126
fbshipit-source-id: 91b78505708ad930f7688cc3e51e53a94d9030e9
Summary:
'echo -e' is only used in this test. Avoiding it makes it pass with the new
test runner.
Reviewed By: DurhamG
Differential Revision: D34790211
fbshipit-source-id: 065853ea953a41294fe631cd0e1d77f64f2c9f05
Summary:
From https://www.mercurial-scm.org/repo/hg/rev/f554f89a2038 it seems
the `seq.py` is for OS X <= 10.10 compatibility. We don't care about
such old systems so let's just use the standard seq. This also improves
test performance and compatibility with the new Python .t runner.
Reviewed By: DurhamG
Differential Revision: D34790216
fbshipit-source-id: 38dcc8d671773725784c9f774c0a6f8fc2239b46
Summary:
`syncrender()` hangs forever with the new test runner.
I haven't figured out why. Let's just mark them as incompatible for now.
Reviewed By: DurhamG
Differential Revision: D34790209
fbshipit-source-id: 306b8da8512d8f86e98b21546774b118a2240632
Summary:
This allows tests to have parts that are incompatible with one of the
test runners.
Reviewed By: DurhamG
Differential Revision: D34725125
fbshipit-source-id: c2639e059011276a160c1c141ae1c3dccc65bd8e
Summary:
When this is not defined, the IHiveLogger passed to the constructor will be
initialized with the NullHiveLogger, thus we can use it to initialize the
FsEventLogger.
Reviewed By: genevievehelsel
Differential Revision: D35855147
fbshipit-source-id: 8a58934327ec866c94c6aa0dbe114dd86af382f4
Summary:
This will be used to validate the behavior of the streamChangesSince API in
integration tests.
Reviewed By: chadaustin
Differential Revision: D35817806
fbshipit-source-id: 42ee1936c0d7ee4f1574642fa11870b7fa7bdb6c
Summary:
This makes it consistent with the naming in the CLI, and will allow introducing
a get_thrift_client for streaming APIs.
Reviewed By: genevievehelsel
Differential Revision: D35767106
fbshipit-source-id: deb45090875b0366111e16e27abba22858b8f370
Summary:
We were previously using some internal Thrift datastructure to see if the
connection had been closed. Let's instead use a folly::CancelletionToken to
decouple ourself from Thrift in core EdenFS. This also allows use to test more
easily that cancellation works as intended, and to remove the need to override
the async_tm_ Thrift handlers.
Reviewed By: chadaustin
Differential Revision: D35663202
fbshipit-source-id: a9dbbdcd6cfc1694912b9d72dada443f0338a434
Summary:
It appears to be completely unused, and thus we do not need it. We still depend
on servicerouter via the backinstore crate (due to memcache), so this change
alone doesn't provide any benefits.
Reviewed By: fanzeyi
Differential Revision: D35853731
fbshipit-source-id: 2d815a75430a5742dc647855370b0f594b34f05a
Summary:
The Rust edenfsctl status didn't know to report about EdenFS server status. This diff fixes that.
This way our user should be able to tell EdenFS is not doing anything but busy starting in the background.
Reviewed By: xavierd
Differential Revision: D35797156
fbshipit-source-id: 4f10073e382b8d9c4deb09690e16530e57ee70fd
Summary: Currently configs passed in by --config get overwritten in the repo init dynamic config generation, though they should take top precedence. Add option to repo init to override configs after dynamic config generation. Move --config flag parsing logic from dispatch to ConfigSet, so it can be reused by the clone command.
Differential Revision: D35796863
fbshipit-source-id: 994fa5eaba8442504605f069b17b984fe92b6c54
Summary: The clone command needs the configfile and config options from the global command options in order for the configs to not be overwritten by dynamicconfig generation. Add a command template that makes the global options available and use them in the clone command.
Differential Revision: D35796075
fbshipit-source-id: 57ee261dfd37db3bc0d07c3e6f91694bd76ca3c7
Summary:
They are having issues on MacOS and Windows (test-doctest.t was blocklisted on
Windows).
Reviewed By: DurhamG
Differential Revision: D35851397
fbshipit-source-id: 4bbef1a581e9b1958b7dc32d7949630a3afb3571
Summary:
The restart tests have started failing recently due to various timeouts. The
root cause is well understood to be caused by an increase in the dependency
graph of EdenFS. Let's increase the timeout while we figure out a way to
decrease the dependencies.
Reviewed By: genevievehelsel
Differential Revision: D35829901
fbshipit-source-id: d7e03ea68308b9eb36e3584d3c073b41378a78de
Summary:
**Context:** I want to allow config changes to decide between DMv1 and v2, so I need to make usages more generic.
This diff makes it so `ChangesetPathHistoryContext` doesn't actually store any deleted manifest ids, and instead work with futures that resolve directly to the linknodes.
This makes it easier for us to use this class with DMv2, without need wrapper types around ids.
This also makes things slightly faster on repeated calls, as it caches the whole linknode, not just the id to then load the linknode from.
Reviewed By: mitrandir77
Differential Revision: D35779796
fbshipit-source-id: def93a62974cdfe02fd5e40c1c29ec49274c91ce
Summary:
Making blame work in the presence of history cycles is non-trivial to get right, and my efforts have led to repeated infinite loops in SCS.
Simply banning cyclic history removes the problem - for now, use an approximation to get it right quickly, and make the problem go away.
Note that the test tests for cases that could be made to work - I hope that this is sufficient that code review will catch badly thought through efforts to make the check precise.
Reviewed By: yancouto
Differential Revision: D35810936
fbshipit-source-id: 19f5f3221d36e6c4270748495dd7de6d45e61ff8
Summary: This now merges given commit, but moves bookmark in the destination repo almost arbitrarily. The bookmark move is used primarily so other tools of ours like tailers (and phabricator) process commits slowly ini batches.
Reviewed By: mitrandir77
Differential Revision: D35600879
fbshipit-source-id: a618006ebf14df413449acf0e8f5aabb11ade3ee
Summary: Adds functions for getting the working copy status and commit status.
Differential Revision: D35685522
fbshipit-source-id: a4527b7e3254e0c755b0c2d62c1d2f9c6596ea88
Summary: Adds a drawdag function for easily creating a repository.
Differential Revision: D35683763
fbshipit-source-id: 23d9faa28b4519b13bca07a029169043bc84eece
Summary: Adds simple functions for reading the bookmark state from a repository.
Differential Revision: D35683767
fbshipit-source-id: c95ea25002e9ed95c35cb4ee8b57898198ae8d3f
Summary:
Adds the ability for the working copy to make a commit, and a basic
Commit abstraction for accesing commit data.
Differential Revision: D35683765
fbshipit-source-id: f2ae6ebe8f03c98f40869a537fe2f191d4394b55
Summary: Adds basic helpers for adding and removing files from the working copy.
Differential Revision: D35683768
fbshipit-source-id: 3fd4746222f53729eefd19a5d9833ae7ee4773d4
Summary:
One of the goals of the new test framework is to run tests with mostly
production configuration. Let's add the appropriate configs to the global hgrc
during test setup.
In the medium term we should get rid of this hard coded list and use
dynamicconfig to generate configs for the tests. But for now let's go with the
hard coded list.
The configs were mostly copied from library.sh a tinit.sh.
Differential Revision: D35683766
fbshipit-source-id: d802066bc801165f361c3418d51ae0e9181629c2
Summary:
This introduces the initial base, repo, and working copy classes for
the new Python OO test library. Future diffs will fill in functionality here.
Differential Revision: D35683764
fbshipit-source-id: 15b33ee9eacf58810b76682d51e2e3446026f5e0
Summary: This trick doesn't matter on Windows, so let's not suggest it on Windows.
Reviewed By: chadaustin
Differential Revision: D35820427
fbshipit-source-id: 44c1d0373d20d921fa55a8edf7e3d9565682a609
Summary:
This makes the conch-parser Python extension included in the generated
Cargo.toml workspace members. It might fix the following `setup.py`
build error:
building 'conch_parser' library extension
error: current package believes it's in a workspace when it's not:
current: /temp/fbcode_builder_getdeps/shipit/eden_scm/eden/scm/edenscmnative/conch_parser/Cargo.toml
workspace: /temp/fbcode_builder_getdeps/shipit/eden_scm/eden/scm/Cargo.toml
this may be fixable by adding `edenscmnative/conch_parser` to the `workspace.members` array of the manifest located at: /data/sandcastle/temp/fbcode_builder_getdeps/shipit/eden_scm/eden/scm/Cargo.toml
Alternatively, to keep it out of the workspace, add the package to the `workspace.exclude` array, or add an empty `[workspace]` table to the package's manifest.
Differential Revision: D35759558
fbshipit-source-id: 2d07285d81092cca10c0fc127c935b5d370f2891
Summary:
On macOS the exported symbol has a leading underscore. Change buck config to
fix the build.
See the Python stdlib `_sqlite3` for example:
$ nm -gU /opt/homebrew/Cellar/python38/3.8.3_1/Frameworks/Python.framework/Versions/3.8/lib/python3.8/lib-dynload/_sqlite3.cpython-38-darwin.so
0000000000005132 T _PyInit__sqlite3
...
Reviewed By: DurhamG
Differential Revision: D35829957
fbshipit-source-id: 23259b982313baae01db0dc6ad4cbe79747e9766
Summary: To decide whether to use python or rust clone, first check if flag options are supported by rust clone. Then check if the repo to be clone has serverside segmented changelog support which is required by rust clone.
Differential Revision: D35507009
fbshipit-source-id: 739dc97e7d1812ccc547f8be3c2e98d22960c3fd
Summary: Add optional content for hgrc file to write out the config file includes and configs like path.
Differential Revision: D35786090
fbshipit-source-id: 5b6fda59864bdd3ce149b490930ccb1e07ddd933
Summary: Add methods to repo to add requirements. We might not want to add these methods, since only clone needs to add reqs for remotefilelog and segmented changelog and we don't want to encourage adding any other requirements outside of repo initialization.
Reviewed By: sggutier
Differential Revision: D35486626
fbshipit-source-id: 55ad6bd3f9e9005cd6280c2443013a1cc615dcec
Summary: Add a method to initialize tracked files in metalog for repo init.
Differential Revision: D35486627
fbshipit-source-id: c29dac5742923c6ede6ee9c9eaeaa34c49f23793
Summary: Create and return a repo object in the Repo::init method so additional loading of the repo is not required to use the repo after calling init.
Differential Revision: D35486628
fbshipit-source-id: 4521742b56925882725ae93524c835b81a910220