Summary:
A lot of tests are passing with the new test runner.
This is done by `./edit-feature-header.py debugruntest` and paste
the `Passed:` section from `hg debugruntest -v test-*.t` output.
Note: some tests fail with this but pass with debugruntest. They
will be investigated as follow-up.
Differential Revision: D34931992
fbshipit-source-id: 99abc3d9800bb1dd3487dbfa15d715c0bd3ba878
Summary:
Now the sort(topo) have similar policy with the smartlog algorithm
(see D35588644 (fadc4e777f) and D35588648 (970e074955)) to beautify the graph, let's just use the
`sort(topo)` in smartlog.
Reviewed By: DurhamG
Differential Revision: D37932746
fbshipit-source-id: 1b73ed8212659def9462c94c0f03d81dd1be24e5
Summary:
If paths.default is missing (ex. an `hg init` or a git repo), the commitcloud
revset (and `hg sl` using it) crash like:
Traceback (most recent call last):
File "edenscm/hgext/commitcloud/__init__.py", line 241, in _smartlog
status.summary(repo)
File "edenscm/hgext/commitcloud/status.py", line 68, in summary
unbackeduprevs = repo.revs("notbackedup()")
File "edenscm/mercurial/localrepo.py", line 1409, in revs
return m(self, subset=subset)
File "edenscm/mercurial/revset.py", line 2799, in mfunc
return getset(repo, subset, tree, order)
# order = 'define'
# subset = <fullreposet+ []>
File "edenscm/mercurial/revset.py", line 105, in getset
return methods[x[0]](repo, subset, *x[1:], order=order)
# order = 'define'
# subset = <fullreposet+ []>
File "edenscm/mercurial/revset.py", line 359, in func
return func(repo, subset, b)
# subset = <fullreposet+ []>
File "edenscm/hgext/commitcloud/__init__.py", line 318, in notbackedup
heads = backupstate.BackupState(repo, ccutil.getremotepath(repo.ui)).heads
File "edenscm/hgext/commitcloud/util.py", line 71, in getremotepath
path = ui.paths.getpath("default")
File "edenscm/mercurial/ui.py", line 1890, in getpath
raise error.RepoError(_("repository %s does not exist") % name)
# name = 'default'
Traceback (most recent call last):
File "edenscm/mercurial/ui.py", line 1883, in getpath
return self[name]
KeyError: 'default'
Avoid that by detecting the empty path and just return empty sets.
Differential Revision: D33197621
fbshipit-source-id: fb5676a7f7be4937328d487824c6d5ee0b18fc59
Summary:
Our current `hg pull` in production typically shows:
% hg pull
pulling from mononoke://...
connected to ... session ...
imported commit graph for ... commits (1 segment)
There is no "added x changesets ..." message. Drop it from tests.
This also makes it easier to migrate tests to remotefilelog repos, since
with remotefilelog it will show "0 changes to 0 files".
Differential Revision: D32570597
fbshipit-source-id: aa660e2cbd9bc07caa74f0126e152589b08e5c57
Summary:
util.islocked function operated directly on a file name, which is peeking too far into the locking abstraction. Instead, replace with new function lock.islocked that uses the normal locking API to determine if a lock is taken. This minor change makes it easier to switch to a rust lock implementation.
I had to reintroduce a flag to skip the deadlock check since islocked tries to acquire a lock that might already be held (on purpose).
One existing user of util.islocked did not have a vfs object available, so I just removed it since it was only used for some debugging output.
Reviewed By: quark-zju
Differential Revision: D31963496
fbshipit-source-id: 67e68909519a789ed9b4f20f60d30c090ee8d3f8
Summary:
modernise tests by using moder newserver function
the function is shorter and it will also allow us to run the tests with Mononoke in the future
Reviewed By: yancouto
Differential Revision: D30773102
fbshipit-source-id: 994cbcfb2688aef3e96446e1cb021db72bc70c67
Summary:
We want to remove filepeer as part of removing server logic in the
client. To start with, let's disable it by default and only enable it in tests
that need it. The next step will be to update those tests.
Reviewed By: quark-zju
Differential Revision: D30977765
fbshipit-source-id: c56016f017e894a15bf43fb7a8d3a0a417663ad9
Summary:
The rust contentstore doesn't allow runtime manipulation of the list of
stores, which is required in order to insert the bundle store into the store.
Let's continue using the old python union store in these cases. This still let's
us delete the python pack code later, but we'll have to keep around the python
union store until we come up with a better solution.
Reviewed By: quark-zju
Differential Revision: D23689630
fbshipit-source-id: 0c60e6f268e81804149afa24409f64b5303e1e34
Summary:
The remaining test failures are mostly around bundle support, which
I'll fix in a later diff.
Reviewed By: quark-zju
Differential Revision: D23664037
fbshipit-source-id: 2bdde3cb4fcded6e0cf3afdc23269662544821df
Summary: Most of them need extra server-side bookmarks for deciding phases.
Reviewed By: DurhamG
Differential Revision: D22117739
fbshipit-source-id: 711bf96063913fd6148125a5628f0b0f4efbf489
Summary:
Notably, we drop all the encoding business when dealing with json
objects, and instead use mercurial.json.
Reviewed By: sfilipco
Differential Revision: D19888130
fbshipit-source-id: 2101c32833484c37ce4376a61220b1b0afeb175a
Summary: This should help reduce test flakiness.
Reviewed By: xavierd
Differential Revision: D19872952
fbshipit-source-id: d66f6c404534b3f47903b478e3cdfdda5ed46284
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
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
Summary:
In preparation for merging fb-mercurial sources to the Eden repository,
move everything from the top-level directory into an `eden/scm`
subdirectory.