# HG changeset patch # User Martin von Zweigbergk # Date 1544120141 28800 # Node ID 21e7c73af75f895b29a375c4d62b5f7a1e655cba # Parent 4edd427f34c14523647ef19fe9ba2bd8d939e87f tests: test that narrow preserves bookmarks on widen When widening inserts older commits in the changelog, we have to preserve bookmarks so they are not removed by the call to repair.strip() we temporarily do. We didn't have any tests for that before. Differential Revision: https://phab.mercurial-scm.org/D5396 diff -r 4edd427f34c1 -r 21e7c73af75f tests/test-narrow.t --- a/tests/test-narrow.t Fri Dec 07 14:23:17 2018 -0800 +++ b/tests/test-narrow.t Thu Dec 06 10:15:41 2018 -0800 @@ -237,6 +237,21 @@ 0: add d0/f $ cd .. +Widening doesn't lose bookmarks + $ hg clone --narrow ssh://user@dummy/master widen-bookmarks --include d0 -q + $ cd widen-bookmarks + $ hg bookmark my-bookmark + $ hg log -T "{rev}: {desc} {bookmarks}\n" + 1: add d10/f my-bookmark + 0: add d0/f + $ hg tracked --addinclude d3 -q + $ hg log -T "{rev}: {desc} {bookmarks}\n" + 3: add d10/f my-bookmark + 2: add d3/f + 1: add d2/f + 0: add d0/f + $ cd .. + Can remove last include, making repo empty $ hg clone --narrow ssh://user@dummy/master narrow-empty --include d0 -r 5 adding changesets