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
F19661096: D21397.id50933.diff
Sat, Feb 7, 5:46 AM
F19617573: D21397.id50933.diff
Wed, Feb 4, 6:36 AM
F19609701: D21397.id.diff
Tue, Feb 3, 1:57 PM
F19525240: D21397.id50933.diff
Sun, Jan 18, 7:26 AM
F19385270: D21397.id50933.diff
Dec 27 2025, 2:06 AM
F19315027: D21397.id.diff
Dec 25 2025, 3:17 AM
F19304190: D21397.diff
Dec 24 2025, 7:48 AM
F18879514: D21397.diff
Nov 6 2025, 6:31 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