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
Unknown Object (File)
Sat, Aug 15, 12:47 AM
Unknown Object (File)
Jul 11 2026, 1:11 AM
Unknown Object (File)
Jun 27 2026, 11:19 PM
Unknown Object (File)
Jun 26 2026, 11:20 PM
Unknown Object (File)
Jun 26 2026, 4:48 AM
Unknown Object (File)
Jun 24 2026, 6:51 AM
Unknown Object (File)
Jun 23 2026, 10:55 AM
Unknown Object (File)
Jun 22 2026, 2:09 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