comparison tests/test-topic.t @ 4703:e15dc6defc99

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.
author Sushil khanchi <sushilkhanchi97@gmail.com>
date Sun, 14 Apr 2019 12:55:46 +0530
parents 493470e7a0f2
children 5f90eb8fd63c
comparison
equal deleted inserted replaced
4700:6af77f89eac5 4703:e15dc6defc99
1064 1064
1065 $ hg topics --age random 1065 $ hg topics --age random
1066 abort: cannot use --age while setting a topic 1066 abort: cannot use --age while setting a topic
1067 [255] 1067 [255]
1068 $ cd .. 1068 $ cd ..
1069
1070 Test that topics doesn't confuse branchheads checking logic
1071 -----------------------------------------------------------
1072
1073 $ hg init hgtags
1074 $ cd hgtags
1075 $ echo a > a
1076 $ hg ci -Am "added a" --config experimental.topic-mode=default
1077 adding a
1078 $ echo b > b
1079 $ hg ci -Am "added b" --config experimental.topic-mode=default
1080 adding b
1081
1082 $ hg topic foo -r .
1083 switching to topic foo
1084 changed topic on 1 changesets to "foo"
1085
1086 Try to put a tag on current rev which also has an active topic:
1087 XXX: it shouldn't have aborted here
1088 $ hg tag 1.0
1089 abort: working directory is not at a branch head (use -f to force)
1090 [255]
1091 $ hg tags
1092 tip 2:3bbb3fdb2546
1093
1094 $ cd ..