Mercurial > hg
changeset 18250:f54898526aad
hidden: use both parents of working directory
If we are merging with and extinct revision, this extinct revision should not be
hidden.
author | Pierre-Yves David <pierre-yves.david@ens-lyon.org> |
---|---|
date | Tue, 08 Jan 2013 17:31:00 +0100 |
parents | e3504d7ff760 |
children | a6483f827512 |
files | mercurial/repoview.py tests/test-log.t |
diffstat | 2 files changed, 15 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/repoview.py Tue Jan 08 14:16:49 2013 +0100 +++ b/mercurial/repoview.py Tue Jan 08 17:31:00 2013 +0100 @@ -18,7 +18,7 @@ assert not repo.changelog.filteredrevs if repo.obsstore: ### hide extinct changeset that are not accessible by any mean - hiddenquery = 'extinct() - ::(. + bookmark())' + hiddenquery = 'extinct() - ::(parents() + bookmark())' return frozenset(repo.revs(hiddenquery)) return frozenset()
--- a/tests/test-log.t Tue Jan 08 14:16:49 2013 +0100 +++ b/tests/test-log.t Tue Jan 08 17:31:00 2013 +0100 @@ -1162,6 +1162,20 @@ 1:a765632148dc55d38c35c4f247c618701886cb2f 0:9f758d63dcde62d547ebfb08e1e7ee96535f2b05 +test that parent prevent a changeset to be hidden + + $ hg up 1 -q + $ hg log --template='{rev}:{node}\n' + 1:a765632148dc55d38c35c4f247c618701886cb2f + 0:9f758d63dcde62d547ebfb08e1e7ee96535f2b05 + +test that second parent prevent a changeset to be hidden too + + $ hg debugsetparents 0 1 # nothing suitable to merge here + $ hg log --template='{rev}:{node}\n' + 1:a765632148dc55d38c35c4f247c618701886cb2f + 0:9f758d63dcde62d547ebfb08e1e7ee96535f2b05 + clear extensions configuration $ echo '[extensions]' >> $HGRCPATH $ echo "obs=!" >> $HGRCPATH