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
F15462309: D21397.diff
Tue, Apr 1, 1:54 PM
F15456044: D21397.id50933.diff
Sun, Mar 30, 6:37 AM
F15453700: D21397.id50934.diff
Sat, Mar 29, 1:41 PM
F15448384: D21397.id.diff
Fri, Mar 28, 4:34 AM
F15439750: D21397.diff
Wed, Mar 26, 9:13 AM
F15426461: D21397.id.diff
Sun, Mar 23, 8:55 AM
F15419957: D21397.diff
Fri, Mar 21, 10:05 AM
F15417240: D21397.id50933.diff
Thu, Mar 20, 4:15 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
Branch
hg8
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 24752
Build 34135: Run Core Tests
Build 34134: arc lint + arc unit