Summary:
Now that all our repos are treemanifest, let's enable the extension by
default in tests. Once we're certain no one needs it in production we'll also
make it the default in core Mercurial.
This diff includes a minor fix in treemanifest to be aware of always-enabled
extensions. It won't matter until we actually add treemanifest to the list of
default enabled extensions, but I caught this while testing things.
Reviewed By: ikostia
Differential Revision: D15030253
fbshipit-source-id: d8361f915928b6ad90665e6ed330c1df5c8d8d86
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:
RocksDB and InnoDB are highly compatibile. There is no need to test RocksDB
engine for every hgsql related tests. Only use rocksdb for 2 of the tests.
Reviewed By: phillco
Differential Revision: D10055068
fbshipit-source-id: f9b7ef546fe7d457b0390e49014ebbe56d3c12c1
Summary:
`test-hgsql-sqlrefill.t` exposes an issue which leads to the
repository ending up in an uncommittable state. This commit fixes that issue by
adding the expected data to the database.
Reviewed By: quark-zju
Differential Revision: D8925906
fbshipit-source-id: 1e0ec827df6e755f72575b03f094b0ca5a400e9b
Summary:
This commit exposes an issue where a successful `sqlrefill` on a
repository which had no data in the database leaves the repository in a state
which can take no further commits.
This exposed issue will be fixed in D8925906.
Reviewed By: quark-zju
Differential Revision: D8925904
fbshipit-source-id: c289c67d90fdb527e6b324ce10f44b0e79e66585
Summary:
`test-hgsql-sqlrefill.t` exposed an issue with `sqlrefill` where the
database is inconsistent with the state of the repository if the repository had
no data in the database before the invocation of `sqlrefill`. This commit fixes
that issue by also updating the `revision_references` table in this case.
Reviewed By: quark-zju
Differential Revision: D8925895
fbshipit-source-id: ca94ba1b3bd168128edc0c845b2fc1439c15181c
Summary:
This commit just introduces some tests for `sqlrefill`.
In particular, it exposes an issue with `sqlrefill` where the heads are not in
sync if the `sqlrefill` is used on a repository which has no corresponding
entry in the database.
Reviewed By: quark-zju
Differential Revision: D8925898
fbshipit-source-id: 46eb388feafd8c7ec61cf9bb61f774055a902867