Summary: Rebase tests can be unpredictible otherwise.
Reviewed By: farnz
Differential Revision: D16701186
fbshipit-source-id: 3c7af531c27ada15ace16c616799e0f569e285a2
Summary:
This adds a new test target that will use Mononoke as the server.
Initially we only support one test, but we can add to this list in the future.
Reviewed By: quark-zju
Differential Revision: D15382714
fbshipit-source-id: ad9b3bd35ffefc01239ff05f9f65829fb7a94555
Summary:
In the next diff we enable Mononoke support for any test using the new
newserver and clone helpers. Mononoke only supports lz4revlog, so we need to
make sure newserver also creates lz4revlog repos.
Reviewed By: quark-zju
Differential Revision: D15382715
fbshipit-source-id: 21da5a3ad14947b87cf09771c723f2109e028da1
Summary:
When using the new server and client helpers, let's set some default
configuration that is expected in production. This will allow us to
mostly-transparently swap out the server with Mononoke for any test who uses
these helpers.
Reviewed By: quark-zju
Differential Revision: D15381856
fbshipit-source-id: 054fcc2768eba38e704e713aeb1bc8e84faa2be1
Summary:
This is a proof of concept test to show how we might convert tests to
use treeonly. A future iteration of this should show how we can insert mononoke
as the backend for the tests.
Reviewed By: quark-zju
Differential Revision: D15382163
fbshipit-source-id: e9c8af871260435f81ef9dbf6f20257b1ff2a35f
Summary:
The `tglogm` test function displays a graph log with mutation information.
Use this common function in all tests.
Differential Revision: D14876688
fbshipit-source-id: 2eb29a45b6267d448d292ac13dbfb0135d6fc8e4
Summary:
Add support for explicit visibility tracking in commit cloud sync.
This means commit cloud reads the visibleheads and syncs these with the commit
cloud heads directly, removing the source of problems where obsmarkers disagree
on different hosts.
Commit cloud requires that the ordering of heads is maintained to get stable
ordering of new commits. Update the visibleheads tracking to maintain
ordering, rather than using sets.
Finally, the calculation of the replacement node was slightly off. This was
revealed in the new test case that is being added, so it is also fixed.
Differential Revision: D14876266
fbshipit-source-id: fe5b6bffd196d3bd74e7582e29484969495eac8e
Summary:
There's a corruption that occurs because pushrebase caches a fulltext
instead of a tree. Let's write a test to expose it. The next diff will fix it.
Reviewed By: mitrandir77
Differential Revision: D13154341
fbshipit-source-id: e2ac040c59c677b414b6eddd39d7dc2ebb25f082
Summary:
This flow has a bug, so let's introduce a test to expose the break. The
next diff will fix the bug.
Reviewed By: quark-zju, singhsrb
Differential Revision: D10156424
fbshipit-source-id: 51d1d8da6728ee930dc1440cd3e685d7c5b5df2a
Summary:
In pushrebase code path, `_getmanifest` needs to be used to obtain the manifest
correctly for pushes from treeonly repos. The merge commit code path missed this
change. Fix it.
Besides, the rename checking code patch can also hit flat manifest errors via
repo.commitctx -> ... -> fctx._copied -> ctx.filenode -> ctx._fileinfo. Patch
that path too.
Reviewed By: phillco
Differential Revision: D9977904
fbshipit-source-id: 8c51aa9cc6bd85b0147d88c61a5af074e36cdb61
Summary:
Previously, there is no easy API to add a namespace with desired order. There
is `extensions.afterloaded`, but that only works for `ui/extsetup`, not for
`reposetup`.
This diff add a namespace predicate so registering a namespace is similar to
registering a revset. It also provides an optional `after` parameter to define
the desired order, like:
from mercurial import registrar, namespaces
namespacepredicate = registrar.namespacepredicate()
namespacepredicate("svn", after=["remotenames"])
def svn(repo):
return namespaces.namespace("svn", ...)
Existing namespaces will be migrated by upcoming changes.
This is useful for things wanting to resolve custom names, like globalrevs and
commit cloud.
Reviewed By: singhsrb
Differential Revision: D9775703
fbshipit-source-id: f15827b042d605b9cebc1ee1af6479903f47ee9c
Summary:
With treedirstate and treestate, dirstate becomes harder to recover. The test
demonstrates related problems.
Reviewed By: DurhamG
Differential Revision: D9375195
fbshipit-source-id: a42ea84e810fe6cd9db8412c2a75fffbebdb6dc7
Summary:
Like D9323267, hg tests commonly reinvent common aliases to render the DAG, and they often differ very slightly. This makes adding a test require more boilerplate, and reading a test in a foreign new area slightly more overhead.
Let's standardize these to reduce the copypasta.
It's necessary to define this as a shell function instead of an hgrc alias to prevent tests that list aliases from printing it. Plus that enforces a nice separation of test/stdlib logic.
Bookmarks and branches are easy enough to add since they're empty if not used. A good number added `{phase}` -- I renamed this to `tglogp`.
Reviewed By: quark-zju
Differential Revision: D9347072
fbshipit-source-id: 6aac7de3e65d2295a7ebecd2ab30901709af3ff1
Summary:
I hit a bug where commit hashes were useful, but it only showed up in the `hg rebase` output late in a test.
I think adding hashes to log output is generally a best practice in tests, since it prevents accidental regressions.
Reviewed By: quark-zju
Differential Revision: D9323265
fbshipit-source-id: a76a01ddd416c68fe8a1c440584b21e5d88dc82a
Summary:
It's duplicate in all the fbamend tests, and I want to make a change to it. Rather than duplicate it, let's fold it into `tinit`.
In the future, I'll unify this with tglog, printdag, etc.
Reviewed By: quark-zju
Differential Revision: D9323267
fbshipit-source-id: c1db0f2f22ffadbcb8ad3c0bde329798db06f089
Summary: They help making tests easier to write.
Reviewed By: phillco
Differential Revision: D7121645
fbshipit-source-id: 9c7181d45c4e28155eb68f355cf1c4cfc077d191
Summary:
`.t` tests have some highly repeatitive logics, like creating a repo, etc.
This patch adds a common shell file that defines frequently used functions.
For now, `newrepo` and `enable` are added. The latter can be used to
enable a feature (ex. obsstore), or an extension.
`test-fb-hgext-fbamend-next.t` and `test-fb-hgext-absorb.t` are migrated
to use the new shell functions.
Reviewed By: phillco
Differential Revision: D7121485
fbshipit-source-id: 167fcc20e4e30864199b6c5af0958b80bfb68817