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
F13092225: D21397.id50934.diff
Thu, Apr 25, 3:31 AM
Unknown Object (File)
Wed, Apr 24, 9:06 AM
Unknown Object (File)
Tue, Apr 23, 5:59 PM
Unknown Object (File)
Sat, Apr 20, 5:25 PM
Unknown Object (File)
Fri, Apr 19, 8:09 PM
Unknown Object (File)
Fri, Mar 29, 5:12 AM
Unknown Object (File)
Wed, Mar 27, 11:44 AM
Unknown Object (File)
Mar 16 2024, 1:53 AM
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