comparison tests/test-topic-tutorial.t @ 4067:fb4801478d5d

stack: display 's#' instead of 't#' and 'b#' If we want people to use it, we should display it.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Mon, 03 Sep 2018 17:07:36 +0200
parents fbc51e98cf13
children dc247e648f43 ef22eef37ecc
comparison
equal deleted inserted replaced
4066:1aa5f851d2c0 4067:fb4801478d5d
250 command: 250 command:
251 251
252 $ hg stack 252 $ hg stack
253 ### topic: food 253 ### topic: food
254 ### target: default (branch) 254 ### target: default (branch)
255 t2@ adding fruits (current) 255 s2@ adding fruits (current)
256 t1: adding condiments 256 s1: adding condiments
257 t0^ Shopping list (base) 257 s0^ Shopping list (base)
258 258
259 The topic deactivates when we update away from it: 259 The topic deactivates when we update away from it:
260 260
261 $ hg update default 261 $ hg update default
262 1 files updated, 0 files merged, 0 files removed, 0 files unresolved 262 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
612 612
613 $ hg topics --list 613 $ hg topics --list
614 ### topic: food 614 ### topic: food
615 ### target: default (branch) 615 ### target: default (branch)
616 (stack is empty) 616 (stack is empty)
617 t0^ adding fruits (base current) 617 s0^ adding fruits (base current)
618 618
619 $ hg log --graph 619 $ hg log --graph
620 @ changeset: 5:2d50db8b5b4c 620 @ changeset: 5:2d50db8b5b4c
621 | tag: tip 621 | tag: tip
622 | user: test 622 | user: test
789 The information displayed by ``hg stack`` adapts to the active topic: 789 The information displayed by ``hg stack`` adapts to the active topic:
790 790
791 $ hg stack 791 $ hg stack
792 ### topic: drinks 792 ### topic: drinks
793 ### target: default (branch) 793 ### target: default (branch)
794 t2@ Adding orange juice (current) 794 s2@ Adding orange juice (current)
795 t1: Adding apple juice 795 s1: Adding apple juice
796 t0^ adding fruits (base) 796 s0^ adding fruits (base)
797 797
798 $ hg update tools 798 $ hg update tools
799 switching to topic tools 799 switching to topic tools
800 1 files updated, 0 files merged, 0 files removed, 0 files unresolved 800 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
801 801
802 $ hg stack 802 $ hg stack
803 ### topic: tools 803 ### topic: tools
804 ### target: default (branch) 804 ### target: default (branch)
805 t3@ Adding drill (current) 805 s3@ Adding drill (current)
806 t2: Adding saw 806 s2: Adding saw
807 t1: Adding hammer 807 s1: Adding hammer
808 t0^ adding fruits (base) 808 s0^ adding fruits (base)
809 809
810 They are seen as independent branches by Mercurial. No rebase or merge 810 They are seen as independent branches by Mercurial. No rebase or merge
811 between them will be attempted by default: 811 between them will be attempted by default:
812 812
813 $ hg rebase 813 $ hg rebase
1119 * tools (on branch: default, 3 changesets, 2 behind) 1119 * tools (on branch: default, 3 changesets, 2 behind)
1120 1120
1121 $ hg stack 1121 $ hg stack
1122 ### topic: tools 1122 ### topic: tools
1123 ### target: default (branch), 2 behind 1123 ### target: default (branch), 2 behind
1124 t3@ Adding drill (current) 1124 s3@ Adding drill (current)
1125 t2: Adding saw 1125 s2: Adding saw
1126 t1: Adding hammer 1126 s1: Adding hammer
1127 t0^ add a pair of shoes (base) 1127 s0^ add a pair of shoes (base)
1128 1128
1129 Working Within Your Stack 1129 Working Within Your Stack
1130 =========================== 1130 ===========================
1131 1131
1132 Navigating within your stack 1132 Navigating within your stack
1138 * tools (on branch: default, 3 changesets, 2 behind) 1138 * tools (on branch: default, 3 changesets, 2 behind)
1139 1139
1140 $ hg stack 1140 $ hg stack
1141 ### topic: tools 1141 ### topic: tools
1142 ### target: default (branch), 2 behind 1142 ### target: default (branch), 2 behind
1143 t3@ Adding drill (current) 1143 s3@ Adding drill (current)
1144 t2: Adding saw 1144 s2: Adding saw
1145 t1: Adding hammer 1145 s1: Adding hammer
1146 t0^ add a pair of shoes (base) 1146 s0^ add a pair of shoes (base)
1147 1147
1148 You can navigate in your current stack with `previous` and `next`. 1148 You can navigate in your current stack with `previous` and `next`.
1149 1149
1150 `previous` will bring you back to the parent of the topic head. 1150 `previous` will bring you back to the parent of the topic head.
1151 1151
1154 [14] Adding saw 1154 [14] Adding saw
1155 1155
1156 $ hg stack 1156 $ hg stack
1157 ### topic: tools 1157 ### topic: tools
1158 ### target: default (branch), 2 behind 1158 ### target: default (branch), 2 behind
1159 t3: Adding drill 1159 s3: Adding drill
1160 t2@ Adding saw (current) 1160 s2@ Adding saw (current)
1161 t1: Adding hammer 1161 s1: Adding hammer
1162 t0^ add a pair of shoes (base) 1162 s0^ add a pair of shoes (base)
1163 1163
1164 `next` will move you forward to the topic head. 1164 `next` will move you forward to the topic head.
1165 1165
1166 $ hg next 1166 $ hg next
1167 1 files updated, 0 files merged, 0 files removed, 0 files unresolved 1167 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1168 [15] Adding drill 1168 [15] Adding drill
1169 1169
1170 $ hg stack 1170 $ hg stack
1171 ### topic: tools 1171 ### topic: tools
1172 ### target: default (branch), 2 behind 1172 ### target: default (branch), 2 behind
1173 t3@ Adding drill (current) 1173 s3@ Adding drill (current)
1174 t2: Adding saw 1174 s2: Adding saw
1175 t1: Adding hammer 1175 s1: Adding hammer
1176 t0^ add a pair of shoes (base) 1176 s0^ add a pair of shoes (base)
1177 1177
1178 You can also directly jump to a changeset within your stack with the revset `t#`. 1178 You can also directly jump to a changeset within your stack with the revset `t#`.
1179 1179
1180 $ hg update s1 1180 $ hg update s1
1181 1 files updated, 0 files merged, 0 files removed, 0 files unresolved 1181 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1182 1182
1183 $ hg stack 1183 $ hg stack
1184 ### topic: tools 1184 ### topic: tools
1185 ### target: default (branch), 2 behind 1185 ### target: default (branch), 2 behind
1186 t3: Adding drill 1186 s3: Adding drill
1187 t2: Adding saw 1187 s2: Adding saw
1188 t1@ Adding hammer (current) 1188 s1@ Adding hammer (current)
1189 t0^ add a pair of shoes (base) 1189 s0^ add a pair of shoes (base)
1190 1190
1191 Editing your work mid-stack 1191 Editing your work mid-stack
1192 --------------------------- 1192 ---------------------------
1193 1193
1194 It's easy to edit your work inside your stack: 1194 It's easy to edit your work inside your stack:
1195 1195
1196 $ hg stack 1196 $ hg stack
1197 ### topic: tools 1197 ### topic: tools
1198 ### target: default (branch), 2 behind 1198 ### target: default (branch), 2 behind
1199 t3: Adding drill 1199 s3: Adding drill
1200 t2: Adding saw 1200 s2: Adding saw
1201 t1@ Adding hammer (current) 1201 s1@ Adding hammer (current)
1202 t0^ add a pair of shoes (base) 1202 s0^ add a pair of shoes (base)
1203 1203
1204 $ hg amend -m "Adding hammer to the shopping list" 1204 $ hg amend -m "Adding hammer to the shopping list"
1205 2 new orphan changesets 1205 2 new orphan changesets
1206 1206
1207 Understanding the current situation with hg log is not so easy, because 1207 Understanding the current situation with hg log is not so easy, because
1356 Fortunately stack shows you a better visualization: 1356 Fortunately stack shows you a better visualization:
1357 1357
1358 $ hg stack 1358 $ hg stack
1359 ### topic: tools 1359 ### topic: tools
1360 ### target: default (branch), 2 behind 1360 ### target: default (branch), 2 behind
1361 t3$ Adding drill (unstable) 1361 s3$ Adding drill (unstable)
1362 t2$ Adding saw (unstable) 1362 s2$ Adding saw (unstable)
1363 t1@ Adding hammer to the shopping list (current) 1363 s1@ Adding hammer to the shopping list (current)
1364 t0^ add a pair of shoes (base) 1364 s0^ add a pair of shoes (base)
1365 1365
1366 It's easy to stabilize the situation, `next` has an `--evolve` option. It will 1366 It's easy to stabilize the situation, `next` has an `--evolve` option. It will
1367 do the necessary relocation of `s2` and `s3` over the new `s1` without having 1367 do the necessary relocation of `s2` and `s3` over the new `s1` without having
1368 to do that rebase by hand.: 1368 to do that rebase by hand.:
1369 1369
1373 working directory now at d5c51ee5762a 1373 working directory now at d5c51ee5762a
1374 1374
1375 $ hg stack 1375 $ hg stack
1376 ### topic: tools 1376 ### topic: tools
1377 ### target: default (branch), 2 behind 1377 ### target: default (branch), 2 behind
1378 t3$ Adding drill (unstable) 1378 s3$ Adding drill (unstable)
1379 t2@ Adding saw (current) 1379 s2@ Adding saw (current)
1380 t1: Adding hammer to the shopping list 1380 s1: Adding hammer to the shopping list
1381 t0^ add a pair of shoes (base) 1381 s0^ add a pair of shoes (base)
1382 1382
1383 One more to go: 1383 One more to go:
1384 1384
1385 $ hg next --evolve 1385 $ hg next --evolve
1386 move:[15] Adding drill 1386 move:[15] Adding drill
1388 working directory now at bae3758e46bf 1388 working directory now at bae3758e46bf
1389 1389
1390 $ hg stack 1390 $ hg stack
1391 ### topic: tools 1391 ### topic: tools
1392 ### target: default (branch), 2 behind 1392 ### target: default (branch), 2 behind
1393 t3@ Adding drill (current) 1393 s3@ Adding drill (current)
1394 t2: Adding saw 1394 s2: Adding saw
1395 t1: Adding hammer to the shopping list 1395 s1: Adding hammer to the shopping list
1396 t0^ add a pair of shoes (base) 1396 s0^ add a pair of shoes (base)
1397 1397
1398 Let's take a look at `hg log` once again: 1398 Let's take a look at `hg log` once again:
1399 1399
1400 $ hg log -G -r "s0::" 1400 $ hg log -G -r "s0::"
1401 @ changeset: 20:bae3758e46bf 1401 @ changeset: 20:bae3758e46bf
1531 $ hg commit -m 'Adding nails' 1531 $ hg commit -m 'Adding nails'
1532 1532
1533 $ hg stack 1533 $ hg stack
1534 ### topic: tools (2 heads) 1534 ### topic: tools (2 heads)
1535 ### target: default (branch), 2 behind 1535 ### target: default (branch), 2 behind
1536 t4: Adding drill 1536 s4: Adding drill
1537 t3: Adding saw 1537 s3: Adding saw
1538 t1^ Adding hammer to the shopping list (base) 1538 s1^ Adding hammer to the shopping list (base)
1539 t2@ Adding nails (current) 1539 s2@ Adding nails (current)
1540 t1: Adding hammer to the shopping list 1540 s1: Adding hammer to the shopping list
1541 t0^ add a pair of shoes (base) 1541 s0^ add a pair of shoes (base)
1542 1542
1543 Solving this situation is easy with a topic: use merge or rebase. 1543 Solving this situation is easy with a topic: use merge or rebase.
1544 Merge within a multi-headed stack will use the other topic head as 1544 Merge within a multi-headed stack will use the other topic head as
1545 destination if the topic has two heads. But rebasing will yield a 1545 destination if the topic has two heads. But rebasing will yield a
1546 completely linear history so it's what we will do. 1546 completely linear history so it's what we will do.
1781 merging shopping 1781 merging shopping
1782 1782
1783 $ hg stack 1783 $ hg stack
1784 ### topic: tools 1784 ### topic: tools
1785 ### target: default (branch), 2 behind 1785 ### target: default (branch), 2 behind
1786 t4@ Adding drill (current) 1786 s4@ Adding drill (current)
1787 t3: Adding saw 1787 s3: Adding saw
1788 t2: Adding nails 1788 s2: Adding nails
1789 t1: Adding hammer to the shopping list 1789 s1: Adding hammer to the shopping list
1790 t0^ add a pair of shoes (base) 1790 s0^ add a pair of shoes (base)
1791 1791
1792 Collaborating through a non-publishing server 1792 Collaborating through a non-publishing server
1793 ============================================= 1793 =============================================
1794 1794
1795 .. setup: 1795 .. setup:
1856 1 files updated, 0 files merged, 0 files removed, 0 files unresolved 1856 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1857 1857
1858 $ hg stack 1858 $ hg stack
1859 ### topic: tools 1859 ### topic: tools
1860 ### target: default (branch), 2 behind 1860 ### target: default (branch), 2 behind
1861 t4@ Adding drill (current) 1861 s4@ Adding drill (current)
1862 t3: Adding saw 1862 s3: Adding saw
1863 t2: Adding nails 1863 s2: Adding nails
1864 t1: Adding hammer to the shopping list 1864 s1: Adding hammer to the shopping list
1865 t0^ add a pair of shoes (base) 1865 s0^ add a pair of shoes (base)
1866 1866
1867 We can also add new changesets and share them: 1867 We can also add new changesets and share them:
1868 1868
1869 $ echo screws >> shopping 1869 $ echo screws >> shopping
1870 1870
1896 1 files updated, 0 files merged, 0 files removed, 0 files unresolved 1896 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1897 1897
1898 $ hg stack 1898 $ hg stack
1899 ### topic: tools 1899 ### topic: tools
1900 ### target: default (branch), 2 behind 1900 ### target: default (branch), 2 behind
1901 t5@ Adding screws (current) 1901 s5@ Adding screws (current)
1902 t4: Adding drill 1902 s4: Adding drill
1903 t3: Adding saw 1903 s3: Adding saw
1904 t2: Adding nails 1904 s2: Adding nails
1905 t1: Adding hammer to the shopping list 1905 s1: Adding hammer to the shopping list
1906 t0^ add a pair of shoes (base) 1906 s0^ add a pair of shoes (base)