annotate tests/test-topic.t @ 1862:565f057bdc08

amend: allow clearing topics on amend
author Matt Mackall <mpm@selenic.com>
date Fri, 19 Jun 2015 16:23:29 -0500
parents 4ab1b854ce4e
children 70d1191fceed
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1839
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
1 $ . "$TESTDIR/testlib"
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
2
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
3 $ hg init pinky
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
4 $ cd pinky
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
5 $ cat <<EOF >> .hg/hgrc
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
6 > [phases]
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
7 > publish=false
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
8 > EOF
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
9
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
10 $ hg help topics
1847
9fa5b8f4e98e topics: add command summary
Matt Mackall <mpm@selenic.com>
parents: 1844
diff changeset
11 hg topics [TOPIC]
1839
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
12
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
13 View current topic, set current topic, or see all topics.
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
14
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
15 options:
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
16
1844
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
17 --clear clear active topic if any
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
18 --change VALUE revset of existing revisions to change topic
1839
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
19
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
20 (some details hidden, use --verbose to show complete help)
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
21 $ hg topics
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
22
1851
67d53e8e0c1a topic: only require obsolete support for --change
Matt Mackall <mpm@selenic.com>
parents: 1849
diff changeset
23 Test topics interaction with evolution:
67d53e8e0c1a topic: only require obsolete support for --change
Matt Mackall <mpm@selenic.com>
parents: 1849
diff changeset
24
67d53e8e0c1a topic: only require obsolete support for --change
Matt Mackall <mpm@selenic.com>
parents: 1849
diff changeset
25 $ hg topics --config experimental.evolution=
67d53e8e0c1a topic: only require obsolete support for --change
Matt Mackall <mpm@selenic.com>
parents: 1849
diff changeset
26 $ hg topics --config experimental.evolution= --change . bob
67d53e8e0c1a topic: only require obsolete support for --change
Matt Mackall <mpm@selenic.com>
parents: 1849
diff changeset
27 abort: must have obsolete enabled to use --change
67d53e8e0c1a topic: only require obsolete support for --change
Matt Mackall <mpm@selenic.com>
parents: 1849
diff changeset
28 [255]
67d53e8e0c1a topic: only require obsolete support for --change
Matt Mackall <mpm@selenic.com>
parents: 1849
diff changeset
29
67d53e8e0c1a topic: only require obsolete support for --change
Matt Mackall <mpm@selenic.com>
parents: 1849
diff changeset
30 Create some changes:
67d53e8e0c1a topic: only require obsolete support for --change
Matt Mackall <mpm@selenic.com>
parents: 1849
diff changeset
31
1839
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
32 $ for x in alpha beta gamma delta ; do
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
33 > echo file $x >> $x
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
34 > hg addremove
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
35 > hg ci -m "Add file $x"
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
36 > done
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
37 adding alpha
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
38 adding beta
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
39 adding gamma
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
40 adding delta
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
41
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
42 Still no topics
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
43 $ hg topics
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
44
1852
3084687f7994 commit: add a topic field to the in-editor commit text
Matt Mackall <mpm@selenic.com>
parents: 1851
diff changeset
45 Test commit flag and help text
3084687f7994 commit: add a topic field to the in-editor commit text
Matt Mackall <mpm@selenic.com>
parents: 1851
diff changeset
46
3084687f7994 commit: add a topic field to the in-editor commit text
Matt Mackall <mpm@selenic.com>
parents: 1851
diff changeset
47 $ echo stuff >> alpha
3084687f7994 commit: add a topic field to the in-editor commit text
Matt Mackall <mpm@selenic.com>
parents: 1851
diff changeset
48 $ HGEDITOR=cat hg ci -t topicflag
3084687f7994 commit: add a topic field to the in-editor commit text
Matt Mackall <mpm@selenic.com>
parents: 1851
diff changeset
49
3084687f7994 commit: add a topic field to the in-editor commit text
Matt Mackall <mpm@selenic.com>
parents: 1851
diff changeset
50
3084687f7994 commit: add a topic field to the in-editor commit text
Matt Mackall <mpm@selenic.com>
parents: 1851
diff changeset
51 HG: Enter commit message. Lines beginning with 'HG:' are removed.
3084687f7994 commit: add a topic field to the in-editor commit text
Matt Mackall <mpm@selenic.com>
parents: 1851
diff changeset
52 HG: Leave message empty to abort commit.
3084687f7994 commit: add a topic field to the in-editor commit text
Matt Mackall <mpm@selenic.com>
parents: 1851
diff changeset
53 HG: --
3084687f7994 commit: add a topic field to the in-editor commit text
Matt Mackall <mpm@selenic.com>
parents: 1851
diff changeset
54 HG: user: test
3084687f7994 commit: add a topic field to the in-editor commit text
Matt Mackall <mpm@selenic.com>
parents: 1851
diff changeset
55 HG: topic 'topicflag'
3084687f7994 commit: add a topic field to the in-editor commit text
Matt Mackall <mpm@selenic.com>
parents: 1851
diff changeset
56 HG: branch 'default'
3084687f7994 commit: add a topic field to the in-editor commit text
Matt Mackall <mpm@selenic.com>
parents: 1851
diff changeset
57 HG: changed alpha
3084687f7994 commit: add a topic field to the in-editor commit text
Matt Mackall <mpm@selenic.com>
parents: 1851
diff changeset
58 abort: empty commit message
3084687f7994 commit: add a topic field to the in-editor commit text
Matt Mackall <mpm@selenic.com>
parents: 1851
diff changeset
59 [255]
3084687f7994 commit: add a topic field to the in-editor commit text
Matt Mackall <mpm@selenic.com>
parents: 1851
diff changeset
60 $ hg revert alpha
3084687f7994 commit: add a topic field to the in-editor commit text
Matt Mackall <mpm@selenic.com>
parents: 1851
diff changeset
61 $ hg topic
3084687f7994 commit: add a topic field to the in-editor commit text
Matt Mackall <mpm@selenic.com>
parents: 1851
diff changeset
62 * topicflag
3084687f7994 commit: add a topic field to the in-editor commit text
Matt Mackall <mpm@selenic.com>
parents: 1851
diff changeset
63
1839
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
64 Make a topic
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
65 $ hg topic narf
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
66 $ hg topics
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
67 * narf
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
68 $ echo topic work >> alpha
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
69 $ hg ci -m 'start on narf'
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
70 $ hg co .^
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
71 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
72 $ hg topic fran
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
73 $ hg topics
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
74 * fran
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
75 narf
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
76 $ echo >> fran work >> beta
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
77 $ hg ci -m 'start on fran'
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
78 created new head
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
79 $ hg co narf
1853
8db7828751b7 topic: wrap the underlying update function rather than the command
Matt Mackall <mpm@selenic.com>
parents: 1852
diff changeset
80 switching to topic narf
1839
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
81 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
82 $ hg topic
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
83 fran
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
84 * narf
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
85 $ echo 'narf!!!' >> alpha
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
86 $ hg ci -m 'narf!'
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
87 $ hg log -G
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
88 @ changeset: 6:7c34953036d6
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
89 | tag: tip
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
90 | topic: narf
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
91 | parent: 4:fb147b0b417c
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
92 | user: test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
93 | date: Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
94 | summary: narf!
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
95 |
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
96 | o changeset: 5:0469d521db49
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
97 | | topic: fran
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
98 | | parent: 3:a53952faf762
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
99 | | user: test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
100 | | date: Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
101 | | summary: start on fran
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
102 | |
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
103 o | changeset: 4:fb147b0b417c
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
104 |/ topic: narf
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
105 | user: test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
106 | date: Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
107 | summary: start on narf
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
108 |
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
109 o changeset: 3:a53952faf762
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
110 | user: test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
111 | date: Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
112 | summary: Add file delta
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
113 |
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
114 o changeset: 2:15d1eb11d2fa
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
115 | user: test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
116 | date: Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
117 | summary: Add file gamma
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
118 |
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
119 o changeset: 1:c692ea2c9224
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
120 | user: test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
121 | date: Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
122 | summary: Add file beta
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
123 |
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
124 o changeset: 0:c2b7d2f7d14b
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
125 user: test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
126 date: Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
127 summary: Add file alpha
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
128
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
129
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
130 Exchanging of topics:
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
131 $ cd ..
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
132 $ hg init brain
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
133 $ hg -R pinky push -r 4 brain
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
134 pushing to brain
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
135 searching for changes
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
136 adding changesets
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
137 adding manifests
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
138 adding file changes
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
139 added 5 changesets with 5 changes to 4 files
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
140 Now that we've pushed to brain, the work done on narf is no longer a
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
141 draft, so we won't see that topic name anymore:
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
142
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
143 $ hg log -R pinky -G
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
144 @ changeset: 6:7c34953036d6
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
145 | tag: tip
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
146 | topic: narf
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
147 | parent: 4:fb147b0b417c
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
148 | user: test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
149 | date: Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
150 | summary: narf!
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
151 |
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
152 | o changeset: 5:0469d521db49
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
153 | | topic: fran
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
154 | | parent: 3:a53952faf762
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
155 | | user: test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
156 | | date: Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
157 | | summary: start on fran
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
158 | |
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
159 o | changeset: 4:fb147b0b417c
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
160 |/ user: test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
161 | date: Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
162 | summary: start on narf
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
163 |
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
164 o changeset: 3:a53952faf762
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
165 | user: test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
166 | date: Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
167 | summary: Add file delta
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
168 |
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
169 o changeset: 2:15d1eb11d2fa
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
170 | user: test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
171 | date: Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
172 | summary: Add file gamma
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
173 |
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
174 o changeset: 1:c692ea2c9224
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
175 | user: test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
176 | date: Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
177 | summary: Add file beta
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
178 |
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
179 o changeset: 0:c2b7d2f7d14b
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
180 user: test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
181 date: Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
182 summary: Add file alpha
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
183
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
184 $ cd brain
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
185 $ hg co tip
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
186 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
187
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
188 Because the change is public, we won't inherit the topic from narf.
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
189
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
190 $ hg topic
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
191 $ echo what >> alpha
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
192 $ hg topic query
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
193 $ hg ci -m 'what is narf, pinky?'
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
194 $ hg log -Gl2
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
195 @ changeset: 5:c01515cfc331
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
196 | tag: tip
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
197 | topic: query
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
198 | user: test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
199 | date: Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
200 | summary: what is narf, pinky?
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
201 |
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
202 o changeset: 4:fb147b0b417c
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
203 | user: test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
204 | date: Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
205 | summary: start on narf
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
206 |
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
207 $ hg push -f ../pinky -r query
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
208 pushing to ../pinky
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
209 searching for changes
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
210 adding changesets
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
211 adding manifests
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
212 adding file changes
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
213 added 1 changesets with 1 changes to 1 files (+1 heads)
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
214 $ hg -R ../pinky log -Gl 4
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
215 o changeset: 7:c01515cfc331
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
216 | tag: tip
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
217 | topic: query
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
218 | parent: 4:fb147b0b417c
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
219 | user: test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
220 | date: Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
221 | summary: what is narf, pinky?
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
222 |
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
223 | @ changeset: 6:7c34953036d6
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
224 |/ topic: narf
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
225 | parent: 4:fb147b0b417c
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
226 | user: test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
227 | date: Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
228 | summary: narf!
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
229 |
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
230 | o changeset: 5:0469d521db49
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
231 | | topic: fran
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
232 | | parent: 3:a53952faf762
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
233 | | user: test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
234 | | date: Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
235 | | summary: start on fran
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
236 | |
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
237 o | changeset: 4:fb147b0b417c
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
238 |/ user: test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
239 | date: Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
240 | summary: start on narf
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
241 |
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
242 $ hg topics
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
243 * query
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
244 $ cd ../pinky
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
245 $ hg co query
1853
8db7828751b7 topic: wrap the underlying update function rather than the command
Matt Mackall <mpm@selenic.com>
parents: 1852
diff changeset
246 switching to topic query
1839
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
247 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
248 $ echo answer >> alpha
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
249 $ hg ci -m 'Narf is like `zort` or `poit`!'
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
250 $ hg merge narf
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
251 merging alpha
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
252 warning: conflicts during merge.
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
253 merging alpha incomplete! (edit conflicts, then use 'hg resolve --mark')
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
254 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
255 use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
256 [1]
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
257 $ hg revert -r narf alpha
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
258 $ hg resolve -m alpha
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
259 (no more unresolved files)
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
260 $ hg topic narf
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
261 $ hg ci -m 'Finish narf'
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
262 $ hg topics
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
263 fran
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
264 * narf
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
265 query
1857
a506ed8ab8da topics: add listnames hook so completion works
Matt Mackall <mpm@selenic.com>
parents: 1853
diff changeset
266 $ hg debugnamecomplete
a506ed8ab8da topics: add listnames hook so completion works
Matt Mackall <mpm@selenic.com>
parents: 1853
diff changeset
267 default
a506ed8ab8da topics: add listnames hook so completion works
Matt Mackall <mpm@selenic.com>
parents: 1853
diff changeset
268 fran
a506ed8ab8da topics: add listnames hook so completion works
Matt Mackall <mpm@selenic.com>
parents: 1853
diff changeset
269 narf
a506ed8ab8da topics: add listnames hook so completion works
Matt Mackall <mpm@selenic.com>
parents: 1853
diff changeset
270 query
a506ed8ab8da topics: add listnames hook so completion works
Matt Mackall <mpm@selenic.com>
parents: 1853
diff changeset
271 tip
1839
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
272 $ hg phase --public narf
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
273
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
274 POSSIBLE BUG: narf topic stays alive even though we just made all
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
275 narf commits public:
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
276
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
277 $ hg topics
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
278 fran
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
279 * narf
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
280 $ hg log -Gl 6
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
281 @ changeset: 9:ae074045b7a7
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
282 |\ tag: tip
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
283 | | parent: 8:54c943c1c167
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
284 | | parent: 6:7c34953036d6
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
285 | | user: test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
286 | | date: Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
287 | | summary: Finish narf
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
288 | |
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
289 | o changeset: 8:54c943c1c167
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
290 | | user: test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
291 | | date: Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
292 | | summary: Narf is like `zort` or `poit`!
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
293 | |
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
294 | o changeset: 7:c01515cfc331
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
295 | | parent: 4:fb147b0b417c
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
296 | | user: test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
297 | | date: Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
298 | | summary: what is narf, pinky?
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
299 | |
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
300 o | changeset: 6:7c34953036d6
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
301 |/ parent: 4:fb147b0b417c
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
302 | user: test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
303 | date: Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
304 | summary: narf!
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
305 |
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
306 | o changeset: 5:0469d521db49
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
307 | | topic: fran
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
308 | | parent: 3:a53952faf762
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
309 | | user: test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
310 | | date: Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
311 | | summary: start on fran
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
312 | |
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
313 o | changeset: 4:fb147b0b417c
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
314 |/ user: test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
315 | date: Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
316 | summary: start on narf
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
317 |
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
318 $ cd ../brain
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
319 $ hg topics
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
320 * query
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
321 $ hg pull ../pinky -r narf
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
322 pulling from ../pinky
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
323 abort: unknown revision 'narf'!
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
324 [255]
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
325 $ hg pull ../pinky -r default
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
326 pulling from ../pinky
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
327 searching for changes
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
328 adding changesets
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
329 adding manifests
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
330 adding file changes
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
331 added 3 changesets with 3 changes to 1 files
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
332 (run 'hg update' to get a working copy)
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
333 $ hg topics
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
334 * query
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
335
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
336 We can pull in the draft-phase change and we get the new topic
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
337
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
338 $ hg pull ../pinky
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
339 pulling from ../pinky
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
340 searching for changes
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
341 adding changesets
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
342 adding manifests
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
343 adding file changes
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
344 added 1 changesets with 1 changes to 1 files (+1 heads)
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
345 (run 'hg heads' to see heads, 'hg merge' to merge)
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
346 $ hg topics
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
347 fran
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
348 * query
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
349 $ hg log -Gr 'draft()'
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
350 o changeset: 9:0469d521db49
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
351 | tag: tip
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
352 | topic: fran
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
353 | parent: 3:a53952faf762
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
354 | user: test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
355 | date: Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
356 | summary: start on fran
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
357 |
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
358
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
359 query is not an open topic, so when we clear the current topic it'll
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
360 disappear:
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
361
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
362 $ hg topics --clear
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
363 $ hg topics
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
364 fran
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
365
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
366 --clear when we don't have an active topic isn't an error:
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
367
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
368 $ hg topics --clear
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
369
1843
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
370 Topic revset
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
371 $ hg log -r 'topic()' -G
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
372 o changeset: 9:0469d521db49
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
373 | tag: tip
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
374 | topic: fran
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
375 | parent: 3:a53952faf762
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
376 | user: test
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
377 | date: Thu Jan 01 00:00:00 1970 +0000
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
378 | summary: start on fran
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
379 |
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
380 $ hg log -r 'not topic()' -G
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
381 o changeset: 8:ae074045b7a7
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
382 |\ parent: 7:54c943c1c167
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
383 | | parent: 6:7c34953036d6
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
384 | | user: test
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
385 | | date: Thu Jan 01 00:00:00 1970 +0000
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
386 | | summary: Finish narf
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
387 | |
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
388 | o changeset: 7:54c943c1c167
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
389 | | parent: 5:c01515cfc331
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
390 | | user: test
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
391 | | date: Thu Jan 01 00:00:00 1970 +0000
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
392 | | summary: Narf is like `zort` or `poit`!
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
393 | |
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
394 o | changeset: 6:7c34953036d6
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
395 | | parent: 4:fb147b0b417c
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
396 | | user: test
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
397 | | date: Thu Jan 01 00:00:00 1970 +0000
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
398 | | summary: narf!
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
399 | |
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
400 | @ changeset: 5:c01515cfc331
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
401 |/ user: test
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
402 | date: Thu Jan 01 00:00:00 1970 +0000
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
403 | summary: what is narf, pinky?
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
404 |
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
405 o changeset: 4:fb147b0b417c
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
406 | user: test
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
407 | date: Thu Jan 01 00:00:00 1970 +0000
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
408 | summary: start on narf
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
409 |
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
410 o changeset: 3:a53952faf762
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
411 | user: test
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
412 | date: Thu Jan 01 00:00:00 1970 +0000
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
413 | summary: Add file delta
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
414 |
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
415 o changeset: 2:15d1eb11d2fa
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
416 | user: test
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
417 | date: Thu Jan 01 00:00:00 1970 +0000
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
418 | summary: Add file gamma
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
419 |
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
420 o changeset: 1:c692ea2c9224
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
421 | user: test
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
422 | date: Thu Jan 01 00:00:00 1970 +0000
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
423 | summary: Add file beta
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
424 |
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
425 o changeset: 0:c2b7d2f7d14b
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
426 user: test
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
427 date: Thu Jan 01 00:00:00 1970 +0000
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
428 summary: Add file alpha
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
429
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
430 No matches because narf is already closed:
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
431 $ hg log -r 'topic(narf)' -G
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
432 This regexp should match the topic `fran`:
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
433 $ hg log -r 'topic("re:.ra.")' -G
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
434 o changeset: 9:0469d521db49
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
435 | tag: tip
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
436 | topic: fran
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
437 | parent: 3:a53952faf762
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
438 | user: test
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
439 | date: Thu Jan 01 00:00:00 1970 +0000
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
440 | summary: start on fran
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
441 |
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
442 Exact match on fran:
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
443 $ hg log -r 'topic(fran)' -G
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
444 o changeset: 9:0469d521db49
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
445 | tag: tip
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
446 | topic: fran
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
447 | parent: 3:a53952faf762
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
448 | user: test
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
449 | date: Thu Jan 01 00:00:00 1970 +0000
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
450 | summary: start on fran
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
451 |
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
452
1839
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
453 Move to fran, note that the topic activates, then deactivate the topic.
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
454
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
455 $ hg co fran
1853
8db7828751b7 topic: wrap the underlying update function rather than the command
Matt Mackall <mpm@selenic.com>
parents: 1852
diff changeset
456 switching to topic fran
1839
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
457 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
458 $ hg topics
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
459 * fran
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
460 $ hg topics --clear
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
461 $ echo fran? >> beta
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
462 $ hg ci -m 'fran?'
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
463 $ hg log -Gr 'draft()'
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
464 @ changeset: 10:4073470c35e1
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
465 | tag: tip
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
466 | user: test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
467 | date: Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
468 | summary: fran?
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
469 |
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
470 o changeset: 9:0469d521db49
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
471 | topic: fran
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
472 | parent: 3:a53952faf762
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
473 | user: test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
474 | date: Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
475 | summary: start on fran
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
476 |
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
477 $ hg topics
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
478 fran
1844
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
479 Changing topic fails if we don't give a topic
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
480 $ hg topic --change 9
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
481 abort: changing topic requires a topic name or --clear
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
482 [255]
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
483
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
484 Can't change topic of a public change
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
485 $ hg topic --change 1:: --clear
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
486 abort: can't change topic of a public change
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
487 [255]
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
488
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
489 Can clear topics
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
490 $ hg topic --change 9 --clear
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
491 changed topic on 1 changes
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
492 please run hg evolve --rev "not topic()" now
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
493 $ hg log -Gr 'draft() and not obsolete()'
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
494 o changeset: 11:783930e1d79e
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
495 | tag: tip
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
496 | parent: 3:a53952faf762
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
497 | user: test
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
498 | date: Thu Jan 01 00:00:00 1970 +0000
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
499 | summary: start on fran
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
500 |
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
501 | @ changeset: 10:4073470c35e1
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
502 | | user: test
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
503 | | date: Thu Jan 01 00:00:00 1970 +0000
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
504 | | summary: fran?
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
505 | |
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
506
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
507 Normally you'd do this with evolve, but we'll use rebase to avoid
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
508 bonus deps in the testsuite.
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
509
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
510 $ hg rebase -d tip -s .
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
511 rebasing 10:4073470c35e1 "fran?"
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
512
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
513 Can add a topic to an existing change
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
514 $ hg topic --change 11 wat
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
515 changed topic on 1 changes
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
516 please run hg evolve --rev "topic(wat)" now
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
517 $ hg log -Gr 'draft() and not obsolete()'
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
518 o changeset: 13:d91cd8fd490e
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
519 | tag: tip
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
520 | topic: wat
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
521 | parent: 3:a53952faf762
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
522 | user: test
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
523 | date: Thu Jan 01 00:00:00 1970 +0000
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
524 | summary: start on fran
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
525 |
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
526 | @ changeset: 12:d9e32f4c4806
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
527 | | user: test
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
528 | | date: Thu Jan 01 00:00:00 1970 +0000
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
529 | | summary: fran?
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
530 | |
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
531
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
532 Normally you'd do this with evolve, but we'll use rebase to avoid
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
533 bonus deps in the testsuite.
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
534
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
535 $ hg rebase -d tip -s .
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
536 rebasing 12:d9e32f4c4806 "fran?"
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
537
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
538 $ hg log -Gr 'draft()'
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
539 @ changeset: 14:cf24ad8bbef5
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
540 | tag: tip
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
541 | topic: wat
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
542 | user: test
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
543 | date: Thu Jan 01 00:00:00 1970 +0000
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
544 | summary: fran?
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
545 |
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
546 o changeset: 13:d91cd8fd490e
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
547 | topic: wat
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
548 | parent: 3:a53952faf762
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
549 | user: test
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
550 | date: Thu Jan 01 00:00:00 1970 +0000
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
551 | summary: start on fran
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
552 |
1858
4ab1b854ce4e topics: allow commits that only change topic (issue4725)
Matt Mackall <mpm@selenic.com>
parents: 1857
diff changeset
553
4ab1b854ce4e topics: allow commits that only change topic (issue4725)
Matt Mackall <mpm@selenic.com>
parents: 1857
diff changeset
554 Amend a topic
4ab1b854ce4e topics: allow commits that only change topic (issue4725)
Matt Mackall <mpm@selenic.com>
parents: 1857
diff changeset
555
4ab1b854ce4e topics: allow commits that only change topic (issue4725)
Matt Mackall <mpm@selenic.com>
parents: 1857
diff changeset
556 $ hg topic watwat
4ab1b854ce4e topics: allow commits that only change topic (issue4725)
Matt Mackall <mpm@selenic.com>
parents: 1857
diff changeset
557 $ hg ci --amend
4ab1b854ce4e topics: allow commits that only change topic (issue4725)
Matt Mackall <mpm@selenic.com>
parents: 1857
diff changeset
558 $ hg log -Gr 'draft()'
4ab1b854ce4e topics: allow commits that only change topic (issue4725)
Matt Mackall <mpm@selenic.com>
parents: 1857
diff changeset
559 @ changeset: 16:893ffcf66c1f
4ab1b854ce4e topics: allow commits that only change topic (issue4725)
Matt Mackall <mpm@selenic.com>
parents: 1857
diff changeset
560 | tag: tip
4ab1b854ce4e topics: allow commits that only change topic (issue4725)
Matt Mackall <mpm@selenic.com>
parents: 1857
diff changeset
561 | topic: watwat
4ab1b854ce4e topics: allow commits that only change topic (issue4725)
Matt Mackall <mpm@selenic.com>
parents: 1857
diff changeset
562 | parent: 13:d91cd8fd490e
4ab1b854ce4e topics: allow commits that only change topic (issue4725)
Matt Mackall <mpm@selenic.com>
parents: 1857
diff changeset
563 | user: test
4ab1b854ce4e topics: allow commits that only change topic (issue4725)
Matt Mackall <mpm@selenic.com>
parents: 1857
diff changeset
564 | date: Thu Jan 01 00:00:00 1970 +0000
4ab1b854ce4e topics: allow commits that only change topic (issue4725)
Matt Mackall <mpm@selenic.com>
parents: 1857
diff changeset
565 | summary: fran?
4ab1b854ce4e topics: allow commits that only change topic (issue4725)
Matt Mackall <mpm@selenic.com>
parents: 1857
diff changeset
566 |
4ab1b854ce4e topics: allow commits that only change topic (issue4725)
Matt Mackall <mpm@selenic.com>
parents: 1857
diff changeset
567 o changeset: 13:d91cd8fd490e
4ab1b854ce4e topics: allow commits that only change topic (issue4725)
Matt Mackall <mpm@selenic.com>
parents: 1857
diff changeset
568 | topic: wat
4ab1b854ce4e topics: allow commits that only change topic (issue4725)
Matt Mackall <mpm@selenic.com>
parents: 1857
diff changeset
569 | parent: 3:a53952faf762
4ab1b854ce4e topics: allow commits that only change topic (issue4725)
Matt Mackall <mpm@selenic.com>
parents: 1857
diff changeset
570 | user: test
4ab1b854ce4e topics: allow commits that only change topic (issue4725)
Matt Mackall <mpm@selenic.com>
parents: 1857
diff changeset
571 | date: Thu Jan 01 00:00:00 1970 +0000
4ab1b854ce4e topics: allow commits that only change topic (issue4725)
Matt Mackall <mpm@selenic.com>
parents: 1857
diff changeset
572 | summary: start on fran
4ab1b854ce4e topics: allow commits that only change topic (issue4725)
Matt Mackall <mpm@selenic.com>
parents: 1857
diff changeset
573 |
1862
565f057bdc08 amend: allow clearing topics on amend
Matt Mackall <mpm@selenic.com>
parents: 1858
diff changeset
574
565f057bdc08 amend: allow clearing topics on amend
Matt Mackall <mpm@selenic.com>
parents: 1858
diff changeset
575 Clear and amend:
565f057bdc08 amend: allow clearing topics on amend
Matt Mackall <mpm@selenic.com>
parents: 1858
diff changeset
576
565f057bdc08 amend: allow clearing topics on amend
Matt Mackall <mpm@selenic.com>
parents: 1858
diff changeset
577 $ hg topic --clear
565f057bdc08 amend: allow clearing topics on amend
Matt Mackall <mpm@selenic.com>
parents: 1858
diff changeset
578 $ hg ci --amend
565f057bdc08 amend: allow clearing topics on amend
Matt Mackall <mpm@selenic.com>
parents: 1858
diff changeset
579 $ hg log -r .
565f057bdc08 amend: allow clearing topics on amend
Matt Mackall <mpm@selenic.com>
parents: 1858
diff changeset
580 changeset: 18:a13639e22b65
565f057bdc08 amend: allow clearing topics on amend
Matt Mackall <mpm@selenic.com>
parents: 1858
diff changeset
581 tag: tip
565f057bdc08 amend: allow clearing topics on amend
Matt Mackall <mpm@selenic.com>
parents: 1858
diff changeset
582 parent: 13:d91cd8fd490e
565f057bdc08 amend: allow clearing topics on amend
Matt Mackall <mpm@selenic.com>
parents: 1858
diff changeset
583 user: test
565f057bdc08 amend: allow clearing topics on amend
Matt Mackall <mpm@selenic.com>
parents: 1858
diff changeset
584 date: Thu Jan 01 00:00:00 1970 +0000
565f057bdc08 amend: allow clearing topics on amend
Matt Mackall <mpm@selenic.com>
parents: 1858
diff changeset
585 summary: fran?
565f057bdc08 amend: allow clearing topics on amend
Matt Mackall <mpm@selenic.com>
parents: 1858
diff changeset
586