annotate tests/test-topic-tutorial.t @ 2720:db3830646e34 stable

tutorial: use rm instead of 'hg rm' for an untracked temporary file
author Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
date Sun, 09 Jul 2017 14:20:24 +0300
parents 5156a67f66a6
children c3a29c7abbee
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2013
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
1 ==============
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
2 Topic Tutorial
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
3 ==============
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
4
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
5 .. This test file is also supposed to be able to compile as a rest file.
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
6
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
7
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
8 .. Some Setup::
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
9
2045
db617700d318 tests: move "test setup" script into a 'testlib' directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2014
diff changeset
10 $ . "$TESTDIR/testlib/topic_setup.sh"
2013
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
11 $ hg init server
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
12 $ cd server
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
13 $ cat >> .hg/hgrc << EOF
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
14 > [ui]
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
15 > user= Shopping Master
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
16 > EOF
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
17 $ cat >> shopping << EOF
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
18 > Spam
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
19 > Whizzo butter
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
20 > Albatross
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
21 > Rat (rather a lot)
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
22 > Jugged fish
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
23 > Blancmange
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
24 > Salmon mousse
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
25 > EOF
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
26 $ hg commit -A -m "Shopping list"
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
27 adding shopping
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
28 $ cd ..
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
29 $ hg clone server client
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
30 updating to branch default
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
31 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
32 $ cd client
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
33 $ cat >> .hg/hgrc << EOF
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
34 > [ui]
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
35 > user= Tutorial User
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
36 > EOF
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
37
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
38 Topic branches are lightweight branches which disappear when changes are
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
39 finalized (move to the public phase). They can help users to organise and share
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
40 their unfinished work.
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
41
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
42 Topic Basics
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
43 ============
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
44
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
45 Let's says we use Mercurial to manage our shopping list::
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
46
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
47 $ hg log --graph
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
48 @ changeset: 0:38da43f0a2ea
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
49 tag: tip
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
50 user: test
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
51 date: Thu Jan 01 00:00:00 1970 +0000
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
52 summary: Shopping list
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
53
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
54
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
55 We are about to do some edition to this list and would like to do them within
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
56 a topic. Creating a new topic is done using the ``topic`` command::
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
57
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
58 $ hg topic food
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
59
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
60 As for named branch, our topic is active but it does not contains any changesets yet::
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
61
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
62 $ hg topic
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
63 * food
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
64 $ hg summary
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
65 parent: 0:38da43f0a2ea tip
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
66 Shopping list
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
67 branch: default
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
68 commit: (clean)
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
69 update: (current)
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
70 topic: food
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
71 $ hg log --graph
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
72 @ changeset: 0:38da43f0a2ea
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
73 tag: tip
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
74 user: test
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
75 date: Thu Jan 01 00:00:00 1970 +0000
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
76 summary: Shopping list
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
77
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
78
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
79 Our next commit will be part of the active topic::
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
80
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
81 $ cat >> shopping << EOF
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
82 > Egg
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
83 > Suggar
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
84 > Vinegar
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
85 > Oil
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
86 > EOF
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
87 $ hg commit -m "adding condiments"
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
88 $ hg log --graph --rev 'topic("food")'
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
89 @ changeset: 1:13900241408b
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
90 | tag: tip
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
91 ~ topic: food
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
92 user: test
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
93 date: Thu Jan 01 00:00:00 1970 +0000
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
94 summary: adding condiments
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
95
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
96
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
97 And future commit will be part of that topic too::
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
98
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
99 $ cat >> shopping << EOF
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
100 > Bananas
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
101 > Pear
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
102 > Apple
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
103 > EOF
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
104 $ hg commit -m "adding fruits"
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
105 $ hg log --graph --rev 'topic("food")'
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
106 @ changeset: 2:287de11b401f
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
107 | tag: tip
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
108 | topic: food
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
109 | user: test
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
110 | date: Thu Jan 01 00:00:00 1970 +0000
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
111 | summary: adding fruits
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
112 |
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
113 o changeset: 1:13900241408b
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
114 | topic: food
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
115 ~ user: test
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
116 date: Thu Jan 01 00:00:00 1970 +0000
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
117 summary: adding condiments
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
118
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
119
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
120 We can get a compact view of the content of our topic using the ``stack`` command::
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
121
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
122 $ hg stack
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
123 ### topic: food
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
124 ### branch: default
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
125 t2@ adding fruits (current)
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
126 t1: adding condiments
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
127 ^ Shopping list
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
128
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
129 The topic desactivate when we update away from it::
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
130
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
131 $ hg up default
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
132 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
133 $ hg topic
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
134 food
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
135
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
136 Note that ``default`` (name of the branch) now refers to the tipmost changeset of default without a topic::
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
137
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
138 $ hg log --graph
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
139 o changeset: 2:287de11b401f
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
140 | tag: tip
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
141 | topic: food
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
142 | user: test
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
143 | date: Thu Jan 01 00:00:00 1970 +0000
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
144 | summary: adding fruits
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
145 |
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
146 o changeset: 1:13900241408b
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
147 | topic: food
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
148 | user: test
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
149 | date: Thu Jan 01 00:00:00 1970 +0000
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
150 | summary: adding condiments
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
151 |
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
152 @ changeset: 0:38da43f0a2ea
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
153 user: test
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
154 date: Thu Jan 01 00:00:00 1970 +0000
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
155 summary: Shopping list
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
156
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
157
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
158 And updating back to the topic reactivate it::
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
159
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
160 $ hg up food
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
161 switching to topic food
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
162 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
163 $ hg topic
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
164 * food
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
165
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
166 The name used for updating does not affect the activation of the topic, updating to a revision part of a topic will activate it in all cases::
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
167
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
168 $ hg up default
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
169 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
170 $ hg up --rev 'desc("condiments")'
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
171 switching to topic food
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
172 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
173 $ hg topic
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
174 * food
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
175
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
176 .. server side activity::
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
177
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
178 $ cd ../server/
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
179 $ cat > shopping << EOF
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
180 > T-Shirt
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
181 > Trousers
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
182 > Spam
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
183 > Whizzo butter
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
184 > Albatross
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
185 > Rat (rather a lot)
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
186 > Jugged fish
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
187 > Blancmange
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
188 > Salmon mousse
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
189 > EOF
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
190 $ hg commit -A -m "Adding clothes"
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
191 $ cd ../client
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
192
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
193 Topic will also affect rebase and merge destination. Let's pull the latest update from the main server::
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
194
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
195 $ hg pull
2120
e38156312410 tests: add glob for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 2045
diff changeset
196 pulling from $TESTTMP/server (glob)
2013
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
197 searching for changes
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
198 adding changesets
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
199 adding manifests
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
200 adding file changes
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
201 added 1 changesets with 1 changes to 1 files (+1 heads)
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
202 (run 'hg heads' to see heads)
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
203 $ hg log -G
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
204 o changeset: 3:6104862e8b84
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
205 | tag: tip
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
206 | parent: 0:38da43f0a2ea
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
207 | user: test
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
208 | date: Thu Jan 01 00:00:00 1970 +0000
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
209 | summary: Adding clothes
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
210 |
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
211 | o changeset: 2:287de11b401f
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
212 | | topic: food
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
213 | | user: test
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
214 | | date: Thu Jan 01 00:00:00 1970 +0000
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
215 | | summary: adding fruits
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
216 | |
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
217 | @ changeset: 1:13900241408b
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
218 |/ topic: food
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
219 | user: test
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
220 | date: Thu Jan 01 00:00:00 1970 +0000
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
221 | summary: adding condiments
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
222 |
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
223 o changeset: 0:38da43f0a2ea
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
224 user: test
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
225 date: Thu Jan 01 00:00:00 1970 +0000
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
226 summary: Shopping list
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
227
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
228
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
229 The topic head will not be considered when merge from the new head of the branch::
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
230
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
231 $ hg up default
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
232 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
233 $ hg merge
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
234 abort: branch 'default' has one head - please merge with an explicit rev
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
235 (run 'hg heads' to see all heads)
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
236 [255]
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
237
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
238 But the topic will see that branch head as a valid destination::
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
239
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
240 $ hg up food
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
241 switching to topic food
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
242 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
243 $ hg rebase
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
244 rebasing 1:13900241408b "adding condiments"
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
245 merging shopping
2679
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2120
diff changeset
246 switching to topic food
2013
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
247 rebasing 2:287de11b401f "adding fruits"
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
248 merging shopping
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
249 $ hg log --graph
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
250 @ changeset: 5:2d50db8b5b4c
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
251 | tag: tip
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
252 | topic: food
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
253 | user: test
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
254 | date: Thu Jan 01 00:00:00 1970 +0000
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
255 | summary: adding fruits
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
256 |
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
257 o changeset: 4:4011b46eeb33
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
258 | topic: food
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
259 | user: test
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
260 | date: Thu Jan 01 00:00:00 1970 +0000
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
261 | summary: adding condiments
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
262 |
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
263 o changeset: 3:6104862e8b84
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
264 | parent: 0:38da43f0a2ea
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
265 | user: test
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
266 | date: Thu Jan 01 00:00:00 1970 +0000
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
267 | summary: Adding clothes
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
268 |
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
269 o changeset: 0:38da43f0a2ea
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
270 user: test
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
271 date: Thu Jan 01 00:00:00 1970 +0000
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
272 summary: Shopping list
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
273
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
274
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
275 The topic information will fade out when we publish the changesets::
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
276
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
277 $ hg topic
2679
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2120
diff changeset
278 * food
2013
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
279 $ hg push
2120
e38156312410 tests: add glob for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 2045
diff changeset
280 pushing to $TESTTMP/server (glob)
2013
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
281 searching for changes
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
282 adding changesets
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
283 adding manifests
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
284 adding file changes
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
285 added 2 changesets with 2 changes to 1 files
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
286 2 new obsolescence markers
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
287 $ hg topic
2679
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2120
diff changeset
288 * food
2013
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
289 $ hg log --graph
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
290 @ changeset: 5:2d50db8b5b4c
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
291 | tag: tip
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
292 | user: test
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
293 | date: Thu Jan 01 00:00:00 1970 +0000
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
294 | summary: adding fruits
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
295 |
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
296 o changeset: 4:4011b46eeb33
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
297 | user: test
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
298 | date: Thu Jan 01 00:00:00 1970 +0000
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
299 | summary: adding condiments
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
300 |
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
301 o changeset: 3:6104862e8b84
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
302 | parent: 0:38da43f0a2ea
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
303 | user: test
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
304 | date: Thu Jan 01 00:00:00 1970 +0000
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
305 | summary: Adding clothes
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
306 |
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
307 o changeset: 0:38da43f0a2ea
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
308 user: test
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
309 date: Thu Jan 01 00:00:00 1970 +0000
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
310 summary: Shopping list
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
311
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
312 $ hg up default
2e8e4619a240 tutorial: add a first version of the tutorial with the basics
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
313 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
2014
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
314
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
315 Working with Multiple Topics
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
316 ============================
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
317
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
318 In the above example, topic are not bring much benefit since you only have one
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
319 line of developement. Topic start to be more useful when you have to work on
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
320 multiple features are the same time.
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
321
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
322 We might go shopping in a hardware store in the same go, so let's add some
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
323 tools to the shopping list withing a new topic::
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
324
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
325 $ hg topic tools
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
326 $ echo hammer >> shopping
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
327 $ hg ci -m 'Adding hammer'
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
328 $ echo saw >> shopping
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
329 $ hg ci -m 'Adding saw'
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
330 $ echo drill >> shopping
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
331 $ hg ci -m 'Adding drill'
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
332
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
333 But are not sure to actually go in the hardward store, so in the meantime, we
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
334 want to extend the list with drinks. We go back to the official default branch
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
335 and start a new topic::
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
336
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
337 $ hg up default
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
338 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
339 $ hg topic drinks
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
340 $ echo 'apple juice' >> shopping
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
341 $ hg ci -m 'Adding apple juice'
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
342 $ echo 'orange juice' >> shopping
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
343 $ hg ci -m 'Adding orange juice'
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
344
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
345 We now have two topics::
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
346
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
347 $ hg topic
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
348 * drinks
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
349 tools
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
350
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
351 The information ``hg stack`` command adapt to the active topic::
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
352
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
353 $ hg stack
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
354 ### topic: drinks
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
355 ### branch: default
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
356 t2@ Adding orange juice (current)
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
357 t1: Adding apple juice
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
358 ^ adding fruits
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
359 $ hg up tools
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
360 switching to topic tools
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
361 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
362 $ hg stack
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
363 ### topic: tools
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
364 ### branch: default
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
365 t3@ Adding drill (current)
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
366 t2: Adding saw
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
367 t1: Adding hammer
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
368 ^ adding fruits
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
369
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
370 They are seen as independant branch by Mercurial. No rebase or merge betwen them will be attempted by default::
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
371
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
372 $ hg rebase
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
373 nothing to rebase
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
374 [1]
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
375
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
376 .. server activity::
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
377
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
378 $ cd ../server
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
379 $ hg up
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
380 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
381 $ mv shopping foo
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
382 $ echo 'Coat' > shopping
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
383 $ cat foo >> shopping
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
384 $ hg ci -m 'add a coat'
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
385 $ echo 'Coat' > shopping
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
386 $ echo 'Shoes' >> shopping
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
387 $ cat foo >> shopping
2720
db3830646e34 tutorial: use rm instead of 'hg rm' for an untracked temporary file
Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
parents: 2679
diff changeset
388 $ rm foo
2014
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
389 $ hg ci -m 'add a pair of shoes'
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
390 $ cd ../client
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
391
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
392 Lets see what other people did in the mean time::
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
393
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
394 $ hg pull
2120
e38156312410 tests: add glob for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 2045
diff changeset
395 pulling from $TESTTMP/server (glob)
2014
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
396 searching for changes
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
397 adding changesets
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
398 adding manifests
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
399 adding file changes
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
400 added 2 changesets with 2 changes to 1 files (+1 heads)
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
401 (run 'hg heads' to see heads)
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
402
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
403 There is new changes! We can simply use ``hg rebase`` to update our changeset on top of the latest::
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
404
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
405 $ hg rebase
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
406 rebasing 6:183984ef46d1 "Adding hammer"
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
407 merging shopping
2679
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2120
diff changeset
408 switching to topic tools
2014
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
409 rebasing 7:cffff85af537 "Adding saw"
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
410 merging shopping
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
411 rebasing 8:34255b455dac "Adding drill"
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
412 merging shopping
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
413
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
414 But what about the other topic? You can use 'hg topic --verbose' to see information about them::
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
415
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
416 $ hg topic --verbose
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
417 drinks (on branch: default, 2 changesets, 2 behind)
2679
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2120
diff changeset
418 * tools (on branch: default, 3 changesets)
2014
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
419
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
420 The "2 behind" is telling you that there is 2 new changesets on the named branch of the topic. You need to merge or rebase to incorporate them.
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
421
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
422 Pushing that topic would create a new heads will be prevented::
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
423
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
424 $ hg push --rev drinks
2120
e38156312410 tests: add glob for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 2045
diff changeset
425 pushing to $TESTTMP/server (glob)
2014
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
426 searching for changes
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
427 abort: push creates new remote head 70dfa201ed73!
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
428 (merge or see 'hg help push' for details about pushing new heads)
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
429 [255]
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
430
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
431
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
432 Even after a rebase Pushing all active topics at the same time will complains about the multiple heads it would create on that branch::
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
433
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
434 $ hg rebase -b drinks
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
435 rebasing 9:8dfa45bd5e0c "Adding apple juice"
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
436 merging shopping
2679
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2120
diff changeset
437 switching to topic drinks
2014
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
438 rebasing 10:70dfa201ed73 "Adding orange juice"
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
439 merging shopping
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
440 switching to topic tools
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
441 $ hg push
2120
e38156312410 tests: add glob for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 2045
diff changeset
442 pushing to $TESTTMP/server (glob)
2014
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
443 searching for changes
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
444 abort: push creates new remote head 4cd7c1591a67!
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
445 (merge or see 'hg help push' for details about pushing new heads)
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
446 [255]
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
447
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
448 Publishing only one of them is allowed (as long as it does not create a new branch head has we just saw in the previous case)::
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
449
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
450 $ hg push -r drinks
2120
e38156312410 tests: add glob for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 2045
diff changeset
451 pushing to $TESTTMP/server (glob)
2014
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
452 searching for changes
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
453 adding changesets
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
454 adding manifests
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
455 adding file changes
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
456 added 2 changesets with 2 changes to 1 files
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
457 2 new obsolescence markers
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
458
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
459 The publishing topic has now vanished, and the one still draft is now marked as "behind"::
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
460
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
461 $ hg topic --verbose
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
462 * tools (on branch: default, 3 changesets, 2 behind)
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
463 $ hg stack
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
464 ### topic: tools
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
465 ### branch: default, 2 behind
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
466 t3@ Adding drill (current)
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
467 t2: Adding saw
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
468 t1: Adding hammer
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
469 ^ add a pair of shoes
cd6d32a0155c tutorial: add a second part about having multiple topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2013
diff changeset
470