comparison tests/test-topic.t @ 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 12c53d7122a7
children d24669df9a4a
comparison
equal deleted inserted replaced
5685:7ee15bf011d6 5686:ff84b99569b0
1164 $ hg tag 1.0 1164 $ hg tag 1.0
1165 $ hg tags 1165 $ hg tags
1166 tip 3:9efc5c3ac635 1166 tip 3:9efc5c3ac635
1167 1.0 2:3bbb3fdb2546 1167 1.0 2:3bbb3fdb2546
1168 1168
1169 test that being on active topic does not change output of `hg heads`
1170
1171 $ hg up 0
1172 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
1173 $ echo c > c
1174 $ hg ci -Am "added c" --config experimental.topic-mode=default
1175 adding c
1176 $ hg log -G -T '{rev} {branch}{if("{topic}", "/{topic}")}\n' --rev 'all()'
1177 @ 4 default
1178 |
1179 | o 3 default/foo
1180 | |
1181 | o 2 default/foo
1182 |/
1183 o 0 default
1184
1185 $ hg heads
1186 changeset: 4:29edef26570b
1187 tag: tip
1188 parent: 0:9092f1db7931
1189 user: test
1190 date: Thu Jan 01 00:00:00 1970 +0000
1191 summary: added c
1192
1193 changeset: 3:9efc5c3ac635
1194 topic: foo
1195 user: test
1196 date: Thu Jan 01 00:00:00 1970 +0000
1197 summary: Added tag 1.0 for changeset 3bbb3fdb2546
1198
1199 $ hg topic foo
1200 marked working directory as topic: foo
1201 XXX: it should have returned both the heads; will be fixed in next patch
1202 $ hg heads
1203 changeset: 3:9efc5c3ac635
1204 topic: foo
1205 user: test
1206 date: Thu Jan 01 00:00:00 1970 +0000
1207 summary: Added tag 1.0 for changeset 3bbb3fdb2546
1208
1209
1210 $ hg up foo
1211 2 files updated, 0 files merged, 1 files removed, 0 files unresolved
1212 XXX: it should have returned both the heads; will be fixed in next patch
1213 $ hg heads
1214 changeset: 3:9efc5c3ac635
1215 topic: foo
1216 user: test
1217 date: Thu Jan 01 00:00:00 1970 +0000
1218 summary: Added tag 1.0 for changeset 3bbb3fdb2546
1219
1169 $ cd .. 1220 $ cd ..