# HG changeset patch # User Sushil khanchi # Date 1555226746 -19800 # Node ID e15dc6defc998a4c360b9d6e07ec59c3459d2685 # Parent 6af77f89eac5bfc3cd98ab035608032e1a997f9d topic: add tests to demonstrate topic confuses the branchhead checking logic While topics are in play, we store the branchheads (which has a topic) in "branchname:topicname" format. After digging into it I found that even in the case when we should have branch heads for "bname:tname" we get heads for "bname". The tests output reflect the confusion in branch head checking logic. Next patch will be fixing the problem. diff -r 6af77f89eac5 -r e15dc6defc99 tests/test-topic.t --- a/tests/test-topic.t Sun Jun 30 23:50:57 2019 +0530 +++ b/tests/test-topic.t Sun Apr 14 12:55:46 2019 +0530 @@ -1066,3 +1066,29 @@ abort: cannot use --age while setting a topic [255] $ cd .. + +Test that topics doesn't confuse branchheads checking logic +----------------------------------------------------------- + + $ hg init hgtags + $ cd hgtags + $ echo a > a + $ hg ci -Am "added a" --config experimental.topic-mode=default + adding a + $ echo b > b + $ hg ci -Am "added b" --config experimental.topic-mode=default + adding b + + $ hg topic foo -r . + switching to topic foo + changed topic on 1 changesets to "foo" + +Try to put a tag on current rev which also has an active topic: +XXX: it shouldn't have aborted here + $ hg tag 1.0 + abort: working directory is not at a branch head (use -f to force) + [255] + $ hg tags + tip 2:3bbb3fdb2546 + + $ cd ..