Mercurial > evolve
changeset 5686:ff84b99569b0
topic: a test to demonstrate a bug in branchheads()
Being on an active topic change the result of `hg heads`,
as demonstrated in added test.
This will be fixed in next patch.
author | Sushil khanchi <sushilkhanchi97@gmail.com> |
---|---|
date | Tue, 01 Dec 2020 00:30:45 +0530 |
parents | 7ee15bf011d6 |
children | d24669df9a4a |
files | tests/test-topic.t |
diffstat | 1 files changed, 51 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/test-topic.t Wed Dec 23 13:50:23 2020 +0100 +++ b/tests/test-topic.t Tue Dec 01 00:30:45 2020 +0530 @@ -1166,4 +1166,55 @@ tip 3:9efc5c3ac635 1.0 2:3bbb3fdb2546 +test that being on active topic does not change output of `hg heads` + + $ hg up 0 + 0 files updated, 0 files merged, 2 files removed, 0 files unresolved + $ echo c > c + $ hg ci -Am "added c" --config experimental.topic-mode=default + adding c + $ hg log -G -T '{rev} {branch}{if("{topic}", "/{topic}")}\n' --rev 'all()' + @ 4 default + | + | o 3 default/foo + | | + | o 2 default/foo + |/ + o 0 default + + $ hg heads + changeset: 4:29edef26570b + tag: tip + parent: 0:9092f1db7931 + user: test + date: Thu Jan 01 00:00:00 1970 +0000 + summary: added c + + changeset: 3:9efc5c3ac635 + topic: foo + user: test + date: Thu Jan 01 00:00:00 1970 +0000 + summary: Added tag 1.0 for changeset 3bbb3fdb2546 + + $ hg topic foo + marked working directory as topic: foo +XXX: it should have returned both the heads; will be fixed in next patch + $ hg heads + changeset: 3:9efc5c3ac635 + topic: foo + user: test + date: Thu Jan 01 00:00:00 1970 +0000 + summary: Added tag 1.0 for changeset 3bbb3fdb2546 + + + $ hg up foo + 2 files updated, 0 files merged, 1 files removed, 0 files unresolved +XXX: it should have returned both the heads; will be fixed in next patch + $ hg heads + changeset: 3:9efc5c3ac635 + topic: foo + user: test + date: Thu Jan 01 00:00:00 1970 +0000 + summary: Added tag 1.0 for changeset 3bbb3fdb2546 + $ cd ..