Page MenuHomePhabricator

Preserve bookmarks across "hg rebase --keep --collapse", and destroy them before "hg strip/prune"
ClosedPublic

Authored by epriestley on Jul 8 2020, 11:21 PM.
Tags
None
Referenced Files
F18879514: D21397.diff
Thu, Nov 6, 6:31 PM
F18751640: D21397.diff
Oct 4 2025, 12:03 PM
F18677952: D21397.id50934.diff
Sep 25 2025, 9:45 PM
F18642884: D21397.id50933.diff
Sep 19 2025, 1:02 AM
F18586680: D21397.id50934.diff
Sep 11 2025, 7:24 PM
F18571083: D21397.id50934.diff
Sep 10 2025, 4:41 AM
F18571081: D21397.id50933.diff
Sep 10 2025, 4:41 AM
F18551690: D21397.id.diff
Sep 8 2025, 12:48 PM
Subscribers
None

Details

Summary

See PHI1808. Currently, "arc land <some bookmark>" does not destroy the bookmark in Mercurial. There are three issues here:

  • "hg rebase --keep --collapse" moves bookmarks to the rewritten commits;
  • "hg strip" moves bookmarks backwards;
  • "hg prune" moves bookmarks backwards.

To get around "hg rebase", save and restore bookmark state.

To get around "hg strip" and "hg prune", explicitly destroy bookmarks pointing at commits before we strip/prune those commits.

Test Plan
  • Ran "arc land <some bookmark> --trace". Saw arc reset the bookmark position after rebasing, and destroy the bookmark explicitly before stripping.
  • When the workflow exited, saw no more bookmark (previously: bookmark existed and pointed at a possibly-intermediate state).

Diff Detail

Repository
rARC Arcanist
Lint
Lint Not Applicable
Unit
Tests Not Applicable