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:
Even if no new commits are created, absorb might still have "applied" some
changes by deleting commits. Let's fix the end-user message.
Reviewed By: DurhamG
Differential Revision: D13531959
fbshipit-source-id: 4d942f3ccd8201e8b62c8bc1c86227d41021b5f9
Summary:
`scmutil.cleanupnodes` was initially ported from absorb to simplify other
commands. Now use it to simplify absorb itself.
This solves a crash when `self.finalnode` is empty (ex. no new commits are
created, only with commits deletion).
Reviewed By: DurhamG
Differential Revision: D13531961
fbshipit-source-id: 7006b5ac5dfc4db897413d18ccd26eedde3c98d9
Summary:
It was to workaround the upstream obsmarker design which cannot support cycles.
Now that our internal obsmarkers can have cycles just fine, and the upcoming
mutation metadata makes it impossible to have cycles. Drop the workaround.
Reviewed By: DurhamG
Differential Revision: D13531960
fbshipit-source-id: d569172f0d2d5a3b4e1f6589be44ac21a09604f3
Summary:
This makes tests closer to production setup and removes a bunch of "saved
backup bundle to ..." messages.
With D9236657, this should not hurt server-side performance.
Unfortunately a lot tests cannot be migrated easily, mostly because revision
numbers are used. They are left with a TODO.
Reviewed By: DurhamG
Differential Revision: D9237694
fbshipit-source-id: c993fce18f07aba09f6d70964e248af8d501575a