annotate tests/test-topic.t @ 2988:62201935e1a7

topics/ui: detect and signal when an empty changeset becomes non-empty
author Aurélien Campéas
date Tue, 26 Sep 2017 12:39:11 +0200
parents 4746b92cc1f8
children 725b660d9886
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2045
db617700d318 tests: move "test setup" script into a 'testlib' directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2019
diff changeset
1 $ . "$TESTDIR/testlib/topic_setup.sh"
1839
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
1931
1cc2b87c91df test: disable the new style rendering for "missing parent"
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1895
diff changeset
9 $ cat <<EOF >> $HGRCPATH
1cc2b87c91df test: disable the new style rendering for "missing parent"
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1895
diff changeset
10 > [experimental]
1cc2b87c91df test: disable the new style rendering for "missing parent"
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1895
diff changeset
11 > # disable the new graph style until we drop 3.7 support
1cc2b87c91df test: disable the new style rendering for "missing parent"
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1895
diff changeset
12 > graphstyle.missing = |
1cc2b87c91df test: disable the new style rendering for "missing parent"
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1895
diff changeset
13 > EOF
1839
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 $ hg help topics
1847
9fa5b8f4e98e topics: add command summary
Matt Mackall <mpm@selenic.com>
parents: 1844
diff changeset
16 hg topics [TOPIC]
1839
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
17
2717
ed45a5fb4452 topics: update the help for `hg topics` describing ways to use the command
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2712
diff changeset
18 View current topic, set current topic, change topic for a set of revisions, or
ed45a5fb4452 topics: update the help for `hg topics` describing ways to use the command
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2712
diff changeset
19 see all topics.
ed45a5fb4452 topics: update the help for `hg topics` describing ways to use the command
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2712
diff changeset
20
ed45a5fb4452 topics: update the help for `hg topics` describing ways to use the command
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2712
diff changeset
21 Clear topic on existing topiced revisions:
2923
8c2d3c474fc6 doc: make paragraphs before example code end with "::" for reST syntax
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 2898
diff changeset
22
8c2d3c474fc6 doc: make paragraphs before example code end with "::" for reST syntax
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 2898
diff changeset
23 hg topic --rev <related revset> --clear
2717
ed45a5fb4452 topics: update the help for `hg topics` describing ways to use the command
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2712
diff changeset
24
ed45a5fb4452 topics: update the help for `hg topics` describing ways to use the command
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2712
diff changeset
25 Change topic on some revisions:
2923
8c2d3c474fc6 doc: make paragraphs before example code end with "::" for reST syntax
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 2898
diff changeset
26
8c2d3c474fc6 doc: make paragraphs before example code end with "::" for reST syntax
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 2898
diff changeset
27 hg topic <newtopicname> --rev <related revset>
2717
ed45a5fb4452 topics: update the help for `hg topics` describing ways to use the command
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2712
diff changeset
28
ed45a5fb4452 topics: update the help for `hg topics` describing ways to use the command
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2712
diff changeset
29 Clear current topic:
2923
8c2d3c474fc6 doc: make paragraphs before example code end with "::" for reST syntax
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 2898
diff changeset
30
8c2d3c474fc6 doc: make paragraphs before example code end with "::" for reST syntax
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 2898
diff changeset
31 hg topic --clear
2717
ed45a5fb4452 topics: update the help for `hg topics` describing ways to use the command
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2712
diff changeset
32
ed45a5fb4452 topics: update the help for `hg topics` describing ways to use the command
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2712
diff changeset
33 Set current topic:
2923
8c2d3c474fc6 doc: make paragraphs before example code end with "::" for reST syntax
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 2898
diff changeset
34
8c2d3c474fc6 doc: make paragraphs before example code end with "::" for reST syntax
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 2898
diff changeset
35 hg topic <topicname>
2717
ed45a5fb4452 topics: update the help for `hg topics` describing ways to use the command
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2712
diff changeset
36
ed45a5fb4452 topics: update the help for `hg topics` describing ways to use the command
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2712
diff changeset
37 List of topics:
2923
8c2d3c474fc6 doc: make paragraphs before example code end with "::" for reST syntax
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 2898
diff changeset
38
8c2d3c474fc6 doc: make paragraphs before example code end with "::" for reST syntax
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 2898
diff changeset
39 hg topics
2717
ed45a5fb4452 topics: update the help for `hg topics` describing ways to use the command
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2712
diff changeset
40
2731
d39942773163 topics: add a new flag --age which will show last touched time for topics
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2718
diff changeset
41 List of topics with their last touched time sorted according to it:
2923
8c2d3c474fc6 doc: make paragraphs before example code end with "::" for reST syntax
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 2898
diff changeset
42
8c2d3c474fc6 doc: make paragraphs before example code end with "::" for reST syntax
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 2898
diff changeset
43 hg topic --age
2731
d39942773163 topics: add a new flag --age which will show last touched time for topics
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2718
diff changeset
44
2717
ed45a5fb4452 topics: update the help for `hg topics` describing ways to use the command
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2712
diff changeset
45 The active topic (if any) will be prepended with a "*".
1839
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
46
2869
b629874ccaac topics: allow use a --current when setting a topic
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2868
diff changeset
47 The '--current' flag helps to take active topic into account. For example,
b629874ccaac topics: allow use a --current when setting a topic
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2868
diff changeset
48 if you want to set the topic on all the draft changesets to the active
b629874ccaac topics: allow use a --current when setting a topic
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2868
diff changeset
49 topic, you can do: 'hg topic -r "draft()" --current'
b629874ccaac topics: allow use a --current when setting a topic
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2868
diff changeset
50
2011
9c7665e3107b documentation: some basic update of the documentation
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 1953
diff changeset
51 The --verbose version of this command display various information on the
9c7665e3107b documentation: some basic update of the documentation
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 1953
diff changeset
52 state of each topic.
9c7665e3107b documentation: some basic update of the documentation
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 1953
diff changeset
53
2898
3dfc88c06378 topic: support --rev argument and properly process then as user input
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2889
diff changeset
54 options ([+] can be repeated):
1839
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
55
2898
3dfc88c06378 topic: support --rev argument and properly process then as user input
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2889
diff changeset
56 --clear clear active topic if any
3dfc88c06378 topic: support --rev argument and properly process then as user input
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2889
diff changeset
57 -r --rev REV [+] revset of existing revisions
3dfc88c06378 topic: support --rev argument and properly process then as user input
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2889
diff changeset
58 -l --list show the stack of changeset in the topic
3dfc88c06378 topic: support --rev argument and properly process then as user input
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2889
diff changeset
59 --age show when you last touched the topics
3dfc88c06378 topic: support --rev argument and properly process then as user input
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2889
diff changeset
60 --current display the current topic only
1839
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
61
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
62 (some details hidden, use --verbose to show complete help)
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
63 $ hg topics
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
64
1851
67d53e8e0c1a topic: only require obsolete support for --change
Matt Mackall <mpm@selenic.com>
parents: 1849
diff changeset
65 Test topics interaction with evolution:
67d53e8e0c1a topic: only require obsolete support for --change
Matt Mackall <mpm@selenic.com>
parents: 1849
diff changeset
66
67d53e8e0c1a topic: only require obsolete support for --change
Matt Mackall <mpm@selenic.com>
parents: 1849
diff changeset
67 $ hg topics --config experimental.evolution=
2643
a9ca94defc29 topics: rename '--change' flag to '--rev' flag
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2624
diff changeset
68 $ hg topics --config experimental.evolution= --rev . bob
a9ca94defc29 topics: rename '--change' flag to '--rev' flag
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2624
diff changeset
69 abort: must have obsolete enabled to change topics
1851
67d53e8e0c1a topic: only require obsolete support for --change
Matt Mackall <mpm@selenic.com>
parents: 1849
diff changeset
70 [255]
67d53e8e0c1a topic: only require obsolete support for --change
Matt Mackall <mpm@selenic.com>
parents: 1849
diff changeset
71
67d53e8e0c1a topic: only require obsolete support for --change
Matt Mackall <mpm@selenic.com>
parents: 1849
diff changeset
72 Create some changes:
67d53e8e0c1a topic: only require obsolete support for --change
Matt Mackall <mpm@selenic.com>
parents: 1849
diff changeset
73
1839
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
74 $ for x in alpha beta gamma delta ; do
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
75 > echo file $x >> $x
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
76 > hg addremove
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
77 > hg ci -m "Add file $x"
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
78 > done
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
79 adding alpha
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
80 adding beta
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
81 adding gamma
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
82 adding delta
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
83
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
84 Still no topics
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
85 $ hg topics
2867
5c0b6af37b21 topics: add a current flag to display current topic
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2860
diff changeset
86 $ hg topics --current
5c0b6af37b21 topics: add a current flag to display current topic
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2860
diff changeset
87 no active topic
5c0b6af37b21 topics: add a current flag to display current topic
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2860
diff changeset
88 [1]
5c0b6af37b21 topics: add a current flag to display current topic
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2860
diff changeset
89 $ hg topics --current somerandomtopic
5c0b6af37b21 topics: add a current flag to display current topic
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2860
diff changeset
90 abort: cannot use --current when setting a topic
5c0b6af37b21 topics: add a current flag to display current topic
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2860
diff changeset
91 [255]
5c0b6af37b21 topics: add a current flag to display current topic
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2860
diff changeset
92 $ hg topics --current --clear
5c0b6af37b21 topics: add a current flag to display current topic
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2860
diff changeset
93 abort: cannot use --current and --clear
5c0b6af37b21 topics: add a current flag to display current topic
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2860
diff changeset
94 [255]
2868
e46b68547017 topic: make --clear + topicname invalid
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2867
diff changeset
95 $ hg topics --clear somerandomtopic
e46b68547017 topic: make --clear + topicname invalid
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2867
diff changeset
96 abort: cannot use --clear when setting a topic
e46b68547017 topic: make --clear + topicname invalid
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2867
diff changeset
97 [255]
1839
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
98
2888
aa5268900ba1 topic: add test showing no restrictions on topic names
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2869
diff changeset
99 Trying some invalid topicnames
aa5268900ba1 topic: add test showing no restrictions on topic names
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2869
diff changeset
100
aa5268900ba1 topic: add test showing no restrictions on topic names
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2869
diff changeset
101 $ hg topic '.'
2889
31cbace4c0f1 topics: make sure we have some restrictions on topic names
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2888
diff changeset
102 abort: the name '.' is reserved
31cbace4c0f1 topics: make sure we have some restrictions on topic names
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2888
diff changeset
103 [255]
2888
aa5268900ba1 topic: add test showing no restrictions on topic names
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2869
diff changeset
104 $ hg topic null
2889
31cbace4c0f1 topics: make sure we have some restrictions on topic names
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2888
diff changeset
105 abort: the name 'null' is reserved
31cbace4c0f1 topics: make sure we have some restrictions on topic names
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2888
diff changeset
106 [255]
2888
aa5268900ba1 topic: add test showing no restrictions on topic names
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2869
diff changeset
107 $ hg topic tip
2889
31cbace4c0f1 topics: make sure we have some restrictions on topic names
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2888
diff changeset
108 abort: the name 'tip' is reserved
31cbace4c0f1 topics: make sure we have some restrictions on topic names
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2888
diff changeset
109 [255]
2888
aa5268900ba1 topic: add test showing no restrictions on topic names
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2869
diff changeset
110 $ hg topic 12345
2889
31cbace4c0f1 topics: make sure we have some restrictions on topic names
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2888
diff changeset
111 abort: cannot use an integer as a name
31cbace4c0f1 topics: make sure we have some restrictions on topic names
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2888
diff changeset
112 [255]
2888
aa5268900ba1 topic: add test showing no restrictions on topic names
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2869
diff changeset
113 $ hg topic ' '
2889
31cbace4c0f1 topics: make sure we have some restrictions on topic names
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2888
diff changeset
114 abort: topic name cannot consist entirely of whitespaces
31cbace4c0f1 topics: make sure we have some restrictions on topic names
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2888
diff changeset
115 [255]
2888
aa5268900ba1 topic: add test showing no restrictions on topic names
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2869
diff changeset
116
1852
3084687f7994 commit: add a topic field to the in-editor commit text
Matt Mackall <mpm@selenic.com>
parents: 1851
diff changeset
117 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
118
3084687f7994 commit: add a topic field to the in-editor commit text
Matt Mackall <mpm@selenic.com>
parents: 1851
diff changeset
119 $ echo stuff >> alpha
3084687f7994 commit: add a topic field to the in-editor commit text
Matt Mackall <mpm@selenic.com>
parents: 1851
diff changeset
120 $ 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
121
3084687f7994 commit: add a topic field to the in-editor commit text
Matt Mackall <mpm@selenic.com>
parents: 1851
diff changeset
122
3084687f7994 commit: add a topic field to the in-editor commit text
Matt Mackall <mpm@selenic.com>
parents: 1851
diff changeset
123 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
124 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
125 HG: --
3084687f7994 commit: add a topic field to the in-editor commit text
Matt Mackall <mpm@selenic.com>
parents: 1851
diff changeset
126 HG: user: test
3084687f7994 commit: add a topic field to the in-editor commit text
Matt Mackall <mpm@selenic.com>
parents: 1851
diff changeset
127 HG: topic 'topicflag'
3084687f7994 commit: add a topic field to the in-editor commit text
Matt Mackall <mpm@selenic.com>
parents: 1851
diff changeset
128 HG: branch 'default'
3084687f7994 commit: add a topic field to the in-editor commit text
Matt Mackall <mpm@selenic.com>
parents: 1851
diff changeset
129 HG: changed alpha
3084687f7994 commit: add a topic field to the in-editor commit text
Matt Mackall <mpm@selenic.com>
parents: 1851
diff changeset
130 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
131 [255]
3084687f7994 commit: add a topic field to the in-editor commit text
Matt Mackall <mpm@selenic.com>
parents: 1851
diff changeset
132 $ hg revert alpha
3084687f7994 commit: add a topic field to the in-editor commit text
Matt Mackall <mpm@selenic.com>
parents: 1851
diff changeset
133 $ hg topic
3084687f7994 commit: add a topic field to the in-editor commit text
Matt Mackall <mpm@selenic.com>
parents: 1851
diff changeset
134 * topicflag
3084687f7994 commit: add a topic field to the in-editor commit text
Matt Mackall <mpm@selenic.com>
parents: 1851
diff changeset
135
1839
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
136 Make a topic
2935
6f7f8c6fcfb0 topics: add tests for cases when a topic is empty
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2929
diff changeset
137
1839
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
138 $ hg topic narf
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
139 $ hg topics
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
140 * narf
2935
6f7f8c6fcfb0 topics: add tests for cases when a topic is empty
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2929
diff changeset
141 $ hg topics -v
2936
3a9303b7b648 topics: show working directory branch when topic is empty
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2935
diff changeset
142 * narf (on branch: default, 0 changesets)
2935
6f7f8c6fcfb0 topics: add tests for cases when a topic is empty
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2929
diff changeset
143 $ hg stack
6f7f8c6fcfb0 topics: add tests for cases when a topic is empty
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2929
diff changeset
144 ### topic: narf
2936
3a9303b7b648 topics: show working directory branch when topic is empty
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2935
diff changeset
145 ### branch: default
2937
b54abc7e80e2 topics: improve the description if topic is not touched
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2936
diff changeset
146 (stack is empty)
2938
9872526fc39f topic: show the t0 even if topic is not yet touched
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2937
diff changeset
147 t0^ Add file delta (base)
2935
6f7f8c6fcfb0 topics: add tests for cases when a topic is empty
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2929
diff changeset
148
6f7f8c6fcfb0 topics: add tests for cases when a topic is empty
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2929
diff changeset
149 Add commits to topic
6f7f8c6fcfb0 topics: add tests for cases when a topic is empty
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2929
diff changeset
150
1839
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
151 $ echo topic work >> alpha
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
152 $ hg ci -m 'start on narf'
2988
62201935e1a7 topics/ui: detect and signal when an empty changeset becomes non-empty
Aurélien Campéas
parents: 2986
diff changeset
153 active topic 'narf' grew its first changeset
1839
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
154 $ hg co .^
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
155 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
156 $ hg topic fran
2985
f63c97c01f92 topics/ui: signal when the topics command creates a new (empty) topic
Aurélien Campéas
parents: 2984
diff changeset
157 marked working directory as topic: fran
1839
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
158 $ hg topics
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
159 * fran
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
160 narf
2867
5c0b6af37b21 topics: add a current flag to display current topic
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2860
diff changeset
161 $ hg topics --current
5c0b6af37b21 topics: add a current flag to display current topic
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2860
diff changeset
162 fran
1839
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
163 $ echo >> fran work >> beta
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
164 $ hg ci -m 'start on fran'
2988
62201935e1a7 topics/ui: detect and signal when an empty changeset becomes non-empty
Aurélien Campéas
parents: 2986
diff changeset
165 active topic 'fran' grew its first changeset
1839
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
166 $ hg co narf
1853
8db7828751b7 topic: wrap the underlying update function rather than the command
Matt Mackall <mpm@selenic.com>
parents: 1852
diff changeset
167 switching to topic narf
1839
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
168 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
169 $ hg topic
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
170 fran
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
171 * narf
1869
995617c7f2fc template: test that topic is accessible through template
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1868
diff changeset
172 $ hg log -r . -T '{topics}\n'
995617c7f2fc template: test that topic is accessible through template
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1868
diff changeset
173 narf
1839
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
174 $ echo 'narf!!!' >> alpha
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
175 $ hg ci -m 'narf!'
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
176 $ hg log -G
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
177 @ changeset: 6:7c34953036d6
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
178 | tag: tip
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
179 | topic: narf
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
180 | parent: 4:fb147b0b417c
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
181 | user: test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
182 | date: Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
183 | summary: narf!
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
184 |
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
185 | o changeset: 5:0469d521db49
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
186 | | topic: fran
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
187 | | parent: 3:a53952faf762
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
188 | | user: test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
189 | | date: Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
190 | | summary: start on fran
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
191 | |
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
192 o | changeset: 4:fb147b0b417c
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
193 |/ topic: narf
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
194 | user: test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
195 | date: Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
196 | summary: start on narf
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
197 |
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
198 o changeset: 3:a53952faf762
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
199 | user: test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
200 | date: Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
201 | summary: Add file delta
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
202 |
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
203 o changeset: 2:15d1eb11d2fa
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
204 | user: test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
205 | date: Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
206 | summary: Add file gamma
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
207 |
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
208 o changeset: 1:c692ea2c9224
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
209 | user: test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
210 | date: Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
211 | summary: Add file beta
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
212 |
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
213 o changeset: 0:c2b7d2f7d14b
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
214 user: test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
215 date: Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
216 summary: Add file alpha
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
217
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
218
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
219 Exchanging of topics:
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
220 $ cd ..
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
221 $ hg init brain
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
222 $ hg -R pinky push -r 4 brain
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
223 pushing to brain
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
224 searching for changes
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
225 adding changesets
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
226 adding manifests
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
227 adding file changes
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
228 added 5 changesets with 5 changes to 4 files
1866
13fc93fb7fbe patch: add topic to exported patch
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1864
diff changeset
229
13fc93fb7fbe patch: add topic to exported patch
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1864
diff changeset
230 Export
13fc93fb7fbe patch: add topic to exported patch
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1864
diff changeset
231
13fc93fb7fbe patch: add topic to exported patch
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1864
diff changeset
232 $ hg -R pinky export
13fc93fb7fbe patch: add topic to exported patch
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1864
diff changeset
233 # HG changeset patch
13fc93fb7fbe patch: add topic to exported patch
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1864
diff changeset
234 # User test
13fc93fb7fbe patch: add topic to exported patch
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1864
diff changeset
235 # Date 0 0
13fc93fb7fbe patch: add topic to exported patch
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1864
diff changeset
236 # Thu Jan 01 00:00:00 1970 +0000
13fc93fb7fbe patch: add topic to exported patch
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1864
diff changeset
237 # Node ID 7c34953036d6a36eae468c550d0592b89ee8bffc
13fc93fb7fbe patch: add topic to exported patch
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1864
diff changeset
238 # Parent fb147b0b417c25ca15547cd945acf51cf8dcaf02
13fc93fb7fbe patch: add topic to exported patch
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1864
diff changeset
239 # EXP-Topic narf
13fc93fb7fbe patch: add topic to exported patch
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1864
diff changeset
240 narf!
13fc93fb7fbe patch: add topic to exported patch
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1864
diff changeset
241
13fc93fb7fbe patch: add topic to exported patch
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1864
diff changeset
242 diff -r fb147b0b417c -r 7c34953036d6 alpha
13fc93fb7fbe patch: add topic to exported patch
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1864
diff changeset
243 --- a/alpha Thu Jan 01 00:00:00 1970 +0000
13fc93fb7fbe patch: add topic to exported patch
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1864
diff changeset
244 +++ b/alpha Thu Jan 01 00:00:00 1970 +0000
13fc93fb7fbe patch: add topic to exported patch
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1864
diff changeset
245 @@ -1,2 +1,3 @@
13fc93fb7fbe patch: add topic to exported patch
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1864
diff changeset
246 file alpha
13fc93fb7fbe patch: add topic to exported patch
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1864
diff changeset
247 topic work
13fc93fb7fbe patch: add topic to exported patch
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1864
diff changeset
248 +narf!!!
1867
c9cacc62fa17 patch: import topic from patch header
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1866
diff changeset
249
c9cacc62fa17 patch: import topic from patch header
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1866
diff changeset
250 Import
c9cacc62fa17 patch: import topic from patch header
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1866
diff changeset
251
c9cacc62fa17 patch: import topic from patch header
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1866
diff changeset
252 $ hg -R pinky export > narf.diff
c9cacc62fa17 patch: import topic from patch header
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1866
diff changeset
253 $ hg -R pinky --config extensions.strip= strip .
c9cacc62fa17 patch: import topic from patch header
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1866
diff changeset
254 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
c9cacc62fa17 patch: import topic from patch header
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1866
diff changeset
255 saved backup bundle to $TESTTMP/pinky/.hg/strip-backup/7c34953036d6-1ff3bae2-backup.hg (glob)
c9cacc62fa17 patch: import topic from patch header
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1866
diff changeset
256 $ hg -R pinky import narf.diff
c9cacc62fa17 patch: import topic from patch header
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1866
diff changeset
257 applying narf.diff
c9cacc62fa17 patch: import topic from patch header
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1866
diff changeset
258 $ hg -R pinky log -r .
c9cacc62fa17 patch: import topic from patch header
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1866
diff changeset
259 changeset: 6:7c34953036d6
c9cacc62fa17 patch: import topic from patch header
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1866
diff changeset
260 tag: tip
c9cacc62fa17 patch: import topic from patch header
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1866
diff changeset
261 topic: narf
c9cacc62fa17 patch: import topic from patch header
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1866
diff changeset
262 parent: 4:fb147b0b417c
c9cacc62fa17 patch: import topic from patch header
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1866
diff changeset
263 user: test
c9cacc62fa17 patch: import topic from patch header
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1866
diff changeset
264 date: Thu Jan 01 00:00:00 1970 +0000
c9cacc62fa17 patch: import topic from patch header
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1866
diff changeset
265 summary: narf!
c9cacc62fa17 patch: import topic from patch header
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1866
diff changeset
266
1839
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
267 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
268 draft, so we won't see that topic name anymore:
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
269
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
270 $ hg log -R pinky -G
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
271 @ changeset: 6:7c34953036d6
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
272 | tag: tip
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
273 | topic: narf
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
274 | parent: 4:fb147b0b417c
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
275 | user: test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
276 | date: Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
277 | summary: narf!
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
278 |
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
279 | o changeset: 5:0469d521db49
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
280 | | topic: fran
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
281 | | parent: 3:a53952faf762
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
282 | | user: test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
283 | | date: Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
284 | | summary: start on fran
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
285 | |
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
286 o | changeset: 4:fb147b0b417c
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
287 |/ user: test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
288 | date: Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
289 | summary: start on narf
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
290 |
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
291 o changeset: 3:a53952faf762
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
292 | user: test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
293 | date: Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
294 | summary: Add file delta
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
295 |
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
296 o changeset: 2:15d1eb11d2fa
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
297 | user: test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
298 | date: Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
299 | summary: Add file gamma
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
300 |
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
301 o changeset: 1:c692ea2c9224
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: Add file beta
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: 0:c2b7d2f7d14b
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
307 user: test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
308 date: Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
309 summary: Add file alpha
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
310
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
311 $ cd brain
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
312 $ hg co tip
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
313 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
314
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
315 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
316
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
317 $ hg topic
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
318 $ echo what >> alpha
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
319 $ hg topic query
2985
f63c97c01f92 topics/ui: signal when the topics command creates a new (empty) topic
Aurélien Campéas
parents: 2984
diff changeset
320 marked working directory as topic: query
1839
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
321 $ hg ci -m 'what is narf, pinky?'
2988
62201935e1a7 topics/ui: detect and signal when an empty changeset becomes non-empty
Aurélien Campéas
parents: 2986
diff changeset
322 active topic 'query' grew its first changeset
1839
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
323 $ hg log -Gl2
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
324 @ changeset: 5:c01515cfc331
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
325 | tag: tip
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
326 | topic: query
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
327 | user: test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
328 | date: Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
329 | summary: what is narf, pinky?
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
330 |
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
331 o changeset: 4:fb147b0b417c
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
332 | user: test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
333 | date: Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
334 | summary: start on narf
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
335 |
2860
27ae7afd9a2a tests: add whitespaces in test-topic.t to make it more readable
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2834
diff changeset
336
1839
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
337 $ hg push -f ../pinky -r query
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
338 pushing to ../pinky
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
339 searching for changes
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
340 adding changesets
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
341 adding manifests
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
342 adding file changes
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
343 added 1 changesets with 1 changes to 1 files (+1 heads)
2860
27ae7afd9a2a tests: add whitespaces in test-topic.t to make it more readable
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2834
diff changeset
344
1839
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
345 $ hg -R ../pinky log -Gl 4
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
346 o changeset: 7:c01515cfc331
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
347 | tag: tip
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
348 | topic: query
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
349 | parent: 4:fb147b0b417c
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
350 | user: test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
351 | date: Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
352 | summary: what is narf, pinky?
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
353 |
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
354 | @ changeset: 6:7c34953036d6
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
355 |/ topic: narf
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
356 | parent: 4:fb147b0b417c
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
357 | user: test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
358 | date: Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
359 | summary: narf!
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
360 |
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
361 | o changeset: 5:0469d521db49
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
362 | | topic: fran
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
363 | | parent: 3:a53952faf762
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
364 | | user: test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
365 | | date: Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
366 | | summary: start on fran
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 o | changeset: 4:fb147b0b417c
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
369 |/ user: test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
370 | date: Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
371 | summary: start on narf
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
372 |
2860
27ae7afd9a2a tests: add whitespaces in test-topic.t to make it more readable
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2834
diff changeset
373
1839
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
374 $ hg topics
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
375 * query
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
376 $ cd ../pinky
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
377 $ hg co query
1853
8db7828751b7 topic: wrap the underlying update function rather than the command
Matt Mackall <mpm@selenic.com>
parents: 1852
diff changeset
378 switching to topic query
1839
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
379 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
380 $ echo answer >> alpha
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
381 $ hg ci -m 'Narf is like `zort` or `poit`!'
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
382 $ hg merge narf
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
383 merging alpha
1868
5cdd5e0a421c test: adapt to newer mercurial
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1867
diff changeset
384 warning: conflicts while merging alpha! (edit, then use 'hg resolve --mark')
1839
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
385 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
386 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
387 [1]
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
388 $ hg revert -r narf alpha
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
389 $ hg resolve -m alpha
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
390 (no more unresolved files)
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
391 $ hg topic narf
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
392 $ hg ci -m 'Finish narf'
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
393 $ hg topics
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
394 fran
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
395 * narf
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
396 query
1885
d49f75eab6a3 topic: take topic in account for all branch head computation
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1874
diff changeset
397 $ hg debugnamecomplete # branch:topic here is a buggy side effect
1857
a506ed8ab8da topics: add listnames hook so completion works
Matt Mackall <mpm@selenic.com>
parents: 1853
diff changeset
398 default
1885
d49f75eab6a3 topic: take topic in account for all branch head computation
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1874
diff changeset
399 default:fran
d49f75eab6a3 topic: take topic in account for all branch head computation
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1874
diff changeset
400 default:narf
d49f75eab6a3 topic: take topic in account for all branch head computation
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1874
diff changeset
401 default:query
1857
a506ed8ab8da topics: add listnames hook so completion works
Matt Mackall <mpm@selenic.com>
parents: 1853
diff changeset
402 fran
a506ed8ab8da topics: add listnames hook so completion works
Matt Mackall <mpm@selenic.com>
parents: 1853
diff changeset
403 narf
a506ed8ab8da topics: add listnames hook so completion works
Matt Mackall <mpm@selenic.com>
parents: 1853
diff changeset
404 query
a506ed8ab8da topics: add listnames hook so completion works
Matt Mackall <mpm@selenic.com>
parents: 1853
diff changeset
405 tip
1839
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
406 $ hg phase --public narf
2986
4746b92cc1f8 topics/ui: signal when an operation entails voiding a topic
Aurélien Campéas
parents: 2985
diff changeset
407 active topic 'narf' is now empty
1839
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
408
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
409 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
410 narf commits public:
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
411
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
412 $ hg topics
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
413 fran
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
414 * narf
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
415 $ hg log -Gl 6
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
416 @ changeset: 9:ae074045b7a7
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
417 |\ tag: tip
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
418 | | parent: 8:54c943c1c167
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
419 | | parent: 6:7c34953036d6
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
420 | | user: test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
421 | | date: Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
422 | | summary: Finish narf
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
423 | |
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
424 | o changeset: 8:54c943c1c167
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
425 | | user: test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
426 | | date: Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
427 | | summary: Narf is like `zort` or `poit`!
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
428 | |
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
429 | o changeset: 7:c01515cfc331
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
430 | | parent: 4:fb147b0b417c
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
431 | | user: test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
432 | | date: Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
433 | | summary: what is narf, pinky?
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
434 | |
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
435 o | changeset: 6:7c34953036d6
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
436 |/ parent: 4:fb147b0b417c
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
437 | user: test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
438 | date: Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
439 | summary: narf!
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
440 |
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
441 | o changeset: 5:0469d521db49
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
442 | | topic: fran
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
443 | | parent: 3:a53952faf762
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
444 | | user: test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
445 | | date: Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
446 | | summary: start on fran
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
447 | |
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
448 o | changeset: 4:fb147b0b417c
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
449 |/ user: test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
450 | date: Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
451 | summary: start on narf
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
452 |
2860
27ae7afd9a2a tests: add whitespaces in test-topic.t to make it more readable
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2834
diff changeset
453
1839
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
454 $ cd ../brain
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
455 $ hg topics
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
456 * query
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
457 $ hg pull ../pinky -r narf
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
458 pulling from ../pinky
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
459 abort: unknown revision 'narf'!
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
460 [255]
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
461 $ hg pull ../pinky -r default
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
462 pulling from ../pinky
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
463 searching for changes
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
464 adding changesets
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
465 adding manifests
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
466 adding file changes
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
467 added 3 changesets with 3 changes to 1 files
2986
4746b92cc1f8 topics/ui: signal when an operation entails voiding a topic
Aurélien Campéas
parents: 2985
diff changeset
468 active topic 'query' is now empty
1839
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
469 (run 'hg update' to get a working copy)
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
470 $ hg topics
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
471 * query
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
472
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
473 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
474
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
475 $ hg pull ../pinky
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
476 pulling from ../pinky
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
477 searching for changes
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
478 adding changesets
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
479 adding manifests
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
480 adding file changes
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
481 added 1 changesets with 1 changes to 1 files (+1 heads)
1885
d49f75eab6a3 topic: take topic in account for all branch head computation
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1874
diff changeset
482 (run 'hg heads' to see heads)
1839
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
483 $ hg topics
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
484 fran
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
485 * query
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
486 $ hg log -Gr 'draft()'
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
487 o changeset: 9:0469d521db49
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
488 | tag: tip
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
489 | topic: fran
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
490 | parent: 3:a53952faf762
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
491 | user: test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
492 | date: Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
493 | summary: start on fran
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
494 |
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
495
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
496 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
497 disappear:
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
498
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
499 $ hg topics --clear
2984
30f6030dca8f topics: signal to the end user when a topic has been forgotten
Aurélien Campéas
parents: 2938
diff changeset
500 clearing empty topic "query"
1839
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
501 $ hg topics
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
502 fran
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
503
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
504 --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
505
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
506 $ hg topics --clear
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
507
1843
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
508 Topic revset
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
509 $ hg log -r 'topic()' -G
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
510 o changeset: 9:0469d521db49
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
511 | tag: tip
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
512 | topic: fran
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
513 | parent: 3:a53952faf762
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
514 | user: test
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
515 | 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
516 | summary: start on fran
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
517 |
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
518 $ hg log -r 'not topic()' -G
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
519 o changeset: 8:ae074045b7a7
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
520 |\ parent: 7:54c943c1c167
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
521 | | parent: 6:7c34953036d6
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
522 | | user: test
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
523 | | 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
524 | | summary: Finish narf
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
525 | |
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
526 | o changeset: 7:54c943c1c167
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
527 | | parent: 5:c01515cfc331
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
528 | | user: test
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
529 | | 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
530 | | 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
531 | |
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
532 o | changeset: 6:7c34953036d6
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
533 | | parent: 4:fb147b0b417c
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
534 | | user: test
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
535 | | 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
536 | | summary: narf!
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
537 | |
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
538 | @ changeset: 5:c01515cfc331
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
539 |/ user: test
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
540 | 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
541 | summary: what is narf, pinky?
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
542 |
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
543 o changeset: 4:fb147b0b417c
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
544 | user: test
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
545 | 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
546 | summary: start on narf
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
547 |
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
548 o changeset: 3:a53952faf762
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
549 | user: test
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
550 | 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
551 | summary: Add file delta
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
552 |
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
553 o changeset: 2:15d1eb11d2fa
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
554 | user: test
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
555 | 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
556 | summary: Add file gamma
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
557 |
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
558 o changeset: 1:c692ea2c9224
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
559 | user: test
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
560 | 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
561 | summary: Add file beta
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
562 |
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
563 o changeset: 0:c2b7d2f7d14b
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
564 user: test
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
565 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
566 summary: Add file alpha
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
567
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
568 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
569 $ hg log -r 'topic(narf)' -G
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
570 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
571 $ 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
572 o changeset: 9:0469d521db49
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
573 | tag: tip
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
574 | topic: fran
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
575 | parent: 3:a53952faf762
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
576 | user: test
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
577 | 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
578 | summary: start on fran
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
579 |
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
580 Exact match on fran:
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
581 $ hg log -r 'topic(fran)' -G
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
582 o changeset: 9:0469d521db49
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
583 | tag: tip
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
584 | topic: fran
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
585 | parent: 3:a53952faf762
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
586 | user: test
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
587 | 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
588 | summary: start on fran
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
589 |
0ba067a97d06 revset: add a topic() revset for querying topics
Augie Fackler <augie@google.com>
parents: 1839
diff changeset
590
1864
70d1191fceed topic: allow use of topic(.) to match the p1 topic
Augie Fackler <raf@durin42.com>
parents: 1862
diff changeset
591 Match current topic:
70d1191fceed topic: allow use of topic(.) to match the p1 topic
Augie Fackler <raf@durin42.com>
parents: 1862
diff changeset
592 $ hg topic
70d1191fceed topic: allow use of topic(.) to match the p1 topic
Augie Fackler <raf@durin42.com>
parents: 1862
diff changeset
593 fran
70d1191fceed topic: allow use of topic(.) to match the p1 topic
Augie Fackler <raf@durin42.com>
parents: 1862
diff changeset
594 $ hg log -r 'topic(.)'
70d1191fceed topic: allow use of topic(.) to match the p1 topic
Augie Fackler <raf@durin42.com>
parents: 1862
diff changeset
595 (no output is expected)
1839
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
596 $ hg co fran
1853
8db7828751b7 topic: wrap the underlying update function rather than the command
Matt Mackall <mpm@selenic.com>
parents: 1852
diff changeset
597 switching to topic fran
1839
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
598 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
1864
70d1191fceed topic: allow use of topic(.) to match the p1 topic
Augie Fackler <raf@durin42.com>
parents: 1862
diff changeset
599 $ hg log -r 'topic(.)'
70d1191fceed topic: allow use of topic(.) to match the p1 topic
Augie Fackler <raf@durin42.com>
parents: 1862
diff changeset
600 changeset: 9:0469d521db49
70d1191fceed topic: allow use of topic(.) to match the p1 topic
Augie Fackler <raf@durin42.com>
parents: 1862
diff changeset
601 tag: tip
70d1191fceed topic: allow use of topic(.) to match the p1 topic
Augie Fackler <raf@durin42.com>
parents: 1862
diff changeset
602 topic: fran
70d1191fceed topic: allow use of topic(.) to match the p1 topic
Augie Fackler <raf@durin42.com>
parents: 1862
diff changeset
603 parent: 3:a53952faf762
70d1191fceed topic: allow use of topic(.) to match the p1 topic
Augie Fackler <raf@durin42.com>
parents: 1862
diff changeset
604 user: test
70d1191fceed topic: allow use of topic(.) to match the p1 topic
Augie Fackler <raf@durin42.com>
parents: 1862
diff changeset
605 date: Thu Jan 01 00:00:00 1970 +0000
70d1191fceed topic: allow use of topic(.) to match the p1 topic
Augie Fackler <raf@durin42.com>
parents: 1862
diff changeset
606 summary: start on fran
70d1191fceed topic: allow use of topic(.) to match the p1 topic
Augie Fackler <raf@durin42.com>
parents: 1862
diff changeset
607
70d1191fceed topic: allow use of topic(.) to match the p1 topic
Augie Fackler <raf@durin42.com>
parents: 1862
diff changeset
608
70d1191fceed topic: allow use of topic(.) to match the p1 topic
Augie Fackler <raf@durin42.com>
parents: 1862
diff changeset
609 Deactivate the topic.
1839
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
610 $ hg topics
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
611 * fran
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
612 $ hg topics --clear
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
613 $ echo fran? >> beta
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
614 $ hg ci -m 'fran?'
1885
d49f75eab6a3 topic: take topic in account for all branch head computation
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1874
diff changeset
615 created new head
1839
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
616 $ hg log -Gr 'draft()'
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
617 @ changeset: 10:4073470c35e1
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
618 | tag: tip
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
619 | user: test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
620 | date: Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
621 | summary: fran?
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
622 |
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
623 o changeset: 9:0469d521db49
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
624 | topic: fran
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
625 | parent: 3:a53952faf762
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
626 | user: test
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
627 | date: Thu Jan 01 00:00:00 1970 +0000
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
628 | summary: start on fran
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
629 |
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
630 $ hg topics
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
631 fran
1844
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
632 Changing topic fails if we don't give a topic
2643
a9ca94defc29 topics: rename '--change' flag to '--rev' flag
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2624
diff changeset
633 $ hg topic --rev 9
1844
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
634 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
635 [255]
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
636
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
637 Can't change topic of a public change
2643
a9ca94defc29 topics: rename '--change' flag to '--rev' flag
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2624
diff changeset
638 $ hg topic --rev 1:: --clear
1844
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
639 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
640 [255]
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
641
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
642 Can clear topics
2643
a9ca94defc29 topics: rename '--change' flag to '--rev' flag
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2624
diff changeset
643 $ hg topic --rev 9 --clear
1844
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
644 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
645 $ hg log -Gr 'draft() and not obsolete()'
2649
cf930521f14d topics: add some noise to rewrittent changeset to prevent hash cycle
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2648
diff changeset
646 o changeset: 11:0beca5ab56c3
1844
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
647 | tag: tip
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
648 | parent: 3:a53952faf762
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
649 | user: test
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
650 | 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
651 | summary: start on fran
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
652 |
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
653 | @ changeset: 10:4073470c35e1
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
654 | | user: test
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
655 | | date: Thu Jan 01 00:00:00 1970 +0000
2834
38db1466c6fb log: unstable was renamed into orphan
Boris Feld <boris.feld@octobus.net>
parents: 2833
diff changeset
656 | | instability: orphan
1844
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
657 | | summary: fran?
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
658 | |
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
659
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
660 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
661 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
662
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
663 $ 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
664 rebasing 10:4073470c35e1 "fran?"
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
665
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
666 Can add a topic to an existing change
2663
c01dc624b358 test: extra output to understand the next changeset better
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2661
diff changeset
667 $ hg topic
c01dc624b358 test: extra output to understand the next changeset better
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2661
diff changeset
668 $ hg sum
c01dc624b358 test: extra output to understand the next changeset better
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2661
diff changeset
669 parent: 12:18b70b8de1f0 tip
c01dc624b358 test: extra output to understand the next changeset better
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2661
diff changeset
670 fran?
c01dc624b358 test: extra output to understand the next changeset better
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2661
diff changeset
671 branch: default
c01dc624b358 test: extra output to understand the next changeset better
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2661
diff changeset
672 commit: (clean)
c01dc624b358 test: extra output to understand the next changeset better
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2661
diff changeset
673 update: 5 new changesets, 2 branch heads (merge)
c01dc624b358 test: extra output to understand the next changeset better
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2661
diff changeset
674 phases: 2 draft
2643
a9ca94defc29 topics: rename '--change' flag to '--rev' flag
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2624
diff changeset
675 $ hg topic --rev 11 wat
1844
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
676 changed topic on 1 changes
2663
c01dc624b358 test: extra output to understand the next changeset better
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2661
diff changeset
677 $ hg log -r .
c01dc624b358 test: extra output to understand the next changeset better
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2661
diff changeset
678 changeset: 12:18b70b8de1f0
c01dc624b358 test: extra output to understand the next changeset better
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2661
diff changeset
679 user: test
c01dc624b358 test: extra output to understand the next changeset better
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2661
diff changeset
680 date: Thu Jan 01 00:00:00 1970 +0000
2834
38db1466c6fb log: unstable was renamed into orphan
Boris Feld <boris.feld@octobus.net>
parents: 2833
diff changeset
681 instability: orphan
2663
c01dc624b358 test: extra output to understand the next changeset better
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2661
diff changeset
682 summary: fran?
c01dc624b358 test: extra output to understand the next changeset better
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2661
diff changeset
683
c01dc624b358 test: extra output to understand the next changeset better
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2661
diff changeset
684 $ hg sum
2834
38db1466c6fb log: unstable was renamed into orphan
Boris Feld <boris.feld@octobus.net>
parents: 2833
diff changeset
685 parent: 12:18b70b8de1f0 (orphan)
2663
c01dc624b358 test: extra output to understand the next changeset better
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2661
diff changeset
686 fran?
c01dc624b358 test: extra output to understand the next changeset better
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2661
diff changeset
687 branch: default
c01dc624b358 test: extra output to understand the next changeset better
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2661
diff changeset
688 commit: (clean)
c01dc624b358 test: extra output to understand the next changeset better
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2661
diff changeset
689 update: 5 new changesets, 2 branch heads (merge)
c01dc624b358 test: extra output to understand the next changeset better
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2661
diff changeset
690 phases: 3 draft
2834
38db1466c6fb log: unstable was renamed into orphan
Boris Feld <boris.feld@octobus.net>
parents: 2833
diff changeset
691 orphan: 1 changesets
2663
c01dc624b358 test: extra output to understand the next changeset better
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2661
diff changeset
692 $ hg topic
2664
ed6fb5f20b24 topics: return early so that other if conditions don't get execute (issue5600)
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2663
diff changeset
693 wat
1844
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
694 $ hg log -Gr 'draft() and not obsolete()'
2649
cf930521f14d topics: add some noise to rewrittent changeset to prevent hash cycle
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2648
diff changeset
695 o changeset: 13:686a642006db
1844
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
696 | tag: tip
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
697 | topic: wat
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
698 | parent: 3:a53952faf762
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
699 | user: test
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
700 | 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
701 | summary: start on fran
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
702 |
2649
cf930521f14d topics: add some noise to rewrittent changeset to prevent hash cycle
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2648
diff changeset
703 | @ changeset: 12:18b70b8de1f0
1844
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
704 | | user: test
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
705 | | date: Thu Jan 01 00:00:00 1970 +0000
2834
38db1466c6fb log: unstable was renamed into orphan
Boris Feld <boris.feld@octobus.net>
parents: 2833
diff changeset
706 | | instability: orphan
1844
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
707 | | summary: fran?
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
708 | |
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
709
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
710 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
711 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
712
2661
914757c70217 tests: expand output to check topic activation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2649
diff changeset
713 $ hg topic
2664
ed6fb5f20b24 topics: return early so that other if conditions don't get execute (issue5600)
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2663
diff changeset
714 wat
1844
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
715 $ hg rebase -d tip -s .
2649
cf930521f14d topics: add some noise to rewrittent changeset to prevent hash cycle
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2648
diff changeset
716 rebasing 12:18b70b8de1f0 "fran?"
2664
ed6fb5f20b24 topics: return early so that other if conditions don't get execute (issue5600)
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2663
diff changeset
717 switching to topic wat
2661
914757c70217 tests: expand output to check topic activation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2649
diff changeset
718 $ hg topic
2679
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2665
diff changeset
719 wat
1844
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
720
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
721 $ hg log -Gr 'draft()'
2679
5156a67f66a6 topics: update current topic to the topic of newly rebased commit (issue5551)
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2665
diff changeset
722 @ changeset: 14:45358f7a5892
1844
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
723 | tag: tip
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
724 | user: test
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
725 | 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
726 | summary: fran?
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
727 |
2649
cf930521f14d topics: add some noise to rewrittent changeset to prevent hash cycle
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2648
diff changeset
728 o changeset: 13:686a642006db
1844
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
729 | topic: wat
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
730 | parent: 3:a53952faf762
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
731 | user: test
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
732 | 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
733 | summary: start on fran
862cabc132fd topic: add ability to change topic of non-public changes
Augie Fackler <augie@google.com>
parents: 1843
diff changeset
734 |
1858
4ab1b854ce4e topics: allow commits that only change topic (issue4725)
Matt Mackall <mpm@selenic.com>
parents: 1857
diff changeset
735
4ab1b854ce4e topics: allow commits that only change topic (issue4725)
Matt Mackall <mpm@selenic.com>
parents: 1857
diff changeset
736 Amend a topic
4ab1b854ce4e topics: allow commits that only change topic (issue4725)
Matt Mackall <mpm@selenic.com>
parents: 1857
diff changeset
737
4ab1b854ce4e topics: allow commits that only change topic (issue4725)
Matt Mackall <mpm@selenic.com>
parents: 1857
diff changeset
738 $ hg topic watwat
2985
f63c97c01f92 topics/ui: signal when the topics command creates a new (empty) topic
Aurélien Campéas
parents: 2984
diff changeset
739 marked working directory as topic: watwat
1858
4ab1b854ce4e topics: allow commits that only change topic (issue4725)
Matt Mackall <mpm@selenic.com>
parents: 1857
diff changeset
740 $ hg ci --amend
2988
62201935e1a7 topics/ui: detect and signal when an empty changeset becomes non-empty
Aurélien Campéas
parents: 2986
diff changeset
741 active topic 'watwat' grew its first changeset
1858
4ab1b854ce4e topics: allow commits that only change topic (issue4725)
Matt Mackall <mpm@selenic.com>
parents: 1857
diff changeset
742 $ hg log -Gr 'draft()'
2929
06844693bb21 tests: update after removing of redundant amend commit
Boris Feld <boris.feld@octobus.net>
parents: 2923
diff changeset
743 @ changeset: 15:6c40a4c21bbe
1858
4ab1b854ce4e topics: allow commits that only change topic (issue4725)
Matt Mackall <mpm@selenic.com>
parents: 1857
diff changeset
744 | tag: tip
4ab1b854ce4e topics: allow commits that only change topic (issue4725)
Matt Mackall <mpm@selenic.com>
parents: 1857
diff changeset
745 | topic: watwat
2649
cf930521f14d topics: add some noise to rewrittent changeset to prevent hash cycle
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2648
diff changeset
746 | parent: 13:686a642006db
1858
4ab1b854ce4e topics: allow commits that only change topic (issue4725)
Matt Mackall <mpm@selenic.com>
parents: 1857
diff changeset
747 | user: test
4ab1b854ce4e topics: allow commits that only change topic (issue4725)
Matt Mackall <mpm@selenic.com>
parents: 1857
diff changeset
748 | 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
749 | summary: fran?
4ab1b854ce4e topics: allow commits that only change topic (issue4725)
Matt Mackall <mpm@selenic.com>
parents: 1857
diff changeset
750 |
2649
cf930521f14d topics: add some noise to rewrittent changeset to prevent hash cycle
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2648
diff changeset
751 o changeset: 13:686a642006db
1858
4ab1b854ce4e topics: allow commits that only change topic (issue4725)
Matt Mackall <mpm@selenic.com>
parents: 1857
diff changeset
752 | topic: wat
4ab1b854ce4e topics: allow commits that only change topic (issue4725)
Matt Mackall <mpm@selenic.com>
parents: 1857
diff changeset
753 | parent: 3:a53952faf762
4ab1b854ce4e topics: allow commits that only change topic (issue4725)
Matt Mackall <mpm@selenic.com>
parents: 1857
diff changeset
754 | user: test
4ab1b854ce4e topics: allow commits that only change topic (issue4725)
Matt Mackall <mpm@selenic.com>
parents: 1857
diff changeset
755 | 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
756 | summary: start on fran
4ab1b854ce4e topics: allow commits that only change topic (issue4725)
Matt Mackall <mpm@selenic.com>
parents: 1857
diff changeset
757 |
1862
565f057bdc08 amend: allow clearing topics on amend
Matt Mackall <mpm@selenic.com>
parents: 1858
diff changeset
758
565f057bdc08 amend: allow clearing topics on amend
Matt Mackall <mpm@selenic.com>
parents: 1858
diff changeset
759 Clear and amend:
565f057bdc08 amend: allow clearing topics on amend
Matt Mackall <mpm@selenic.com>
parents: 1858
diff changeset
760
565f057bdc08 amend: allow clearing topics on amend
Matt Mackall <mpm@selenic.com>
parents: 1858
diff changeset
761 $ hg topic --clear
565f057bdc08 amend: allow clearing topics on amend
Matt Mackall <mpm@selenic.com>
parents: 1858
diff changeset
762 $ hg ci --amend
565f057bdc08 amend: allow clearing topics on amend
Matt Mackall <mpm@selenic.com>
parents: 1858
diff changeset
763 $ hg log -r .
2929
06844693bb21 tests: update after removing of redundant amend commit
Boris Feld <boris.feld@octobus.net>
parents: 2923
diff changeset
764 changeset: 16:0f9cd5070654
1862
565f057bdc08 amend: allow clearing topics on amend
Matt Mackall <mpm@selenic.com>
parents: 1858
diff changeset
765 tag: tip
2649
cf930521f14d topics: add some noise to rewrittent changeset to prevent hash cycle
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2648
diff changeset
766 parent: 13:686a642006db
1862
565f057bdc08 amend: allow clearing topics on amend
Matt Mackall <mpm@selenic.com>
parents: 1858
diff changeset
767 user: test
565f057bdc08 amend: allow clearing topics on amend
Matt Mackall <mpm@selenic.com>
parents: 1858
diff changeset
768 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
769 summary: fran?
565f057bdc08 amend: allow clearing topics on amend
Matt Mackall <mpm@selenic.com>
parents: 1858
diff changeset
770
2643
a9ca94defc29 topics: rename '--change' flag to '--rev' flag
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2624
diff changeset
771 Reading the same topic with topic --rev should work:
a9ca94defc29 topics: rename '--change' flag to '--rev' flag
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2624
diff changeset
772 $ hg topic --rev . watwat
2648
d8b47d961c77 topic-change: update the working copy along when changing topic of '.'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2646
diff changeset
773 switching to topic watwat
1874
ec28b6c3414a topic: fix changing topics of commits that have an amend_source
Augie Fackler <raf@durin42.com>
parents: 1869
diff changeset
774 changed topic on 1 changes
2623
a263f4c0f2ee tests: add a test to show issue5441 in test-topic.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2045
diff changeset
775
a263f4c0f2ee tests: add a test to show issue5441 in test-topic.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2045
diff changeset
776 Testing issue5441
2929
06844693bb21 tests: update after removing of redundant amend commit
Boris Feld <boris.feld@octobus.net>
parents: 2923
diff changeset
777 $ hg co 17
2623
a263f4c0f2ee tests: add a test to show issue5441 in test-topic.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2045
diff changeset
778 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
a263f4c0f2ee tests: add a test to show issue5441 in test-topic.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2045
diff changeset
779 $ hg log -Gr 'draft()'
2929
06844693bb21 tests: update after removing of redundant amend commit
Boris Feld <boris.feld@octobus.net>
parents: 2923
diff changeset
780 @ changeset: 17:980a0f608481
2623
a263f4c0f2ee tests: add a test to show issue5441 in test-topic.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2045
diff changeset
781 | tag: tip
a263f4c0f2ee tests: add a test to show issue5441 in test-topic.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2045
diff changeset
782 | topic: watwat
2649
cf930521f14d topics: add some noise to rewrittent changeset to prevent hash cycle
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2648
diff changeset
783 | parent: 13:686a642006db
2623
a263f4c0f2ee tests: add a test to show issue5441 in test-topic.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2045
diff changeset
784 | user: test
a263f4c0f2ee tests: add a test to show issue5441 in test-topic.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2045
diff changeset
785 | date: Thu Jan 01 00:00:00 1970 +0000
a263f4c0f2ee tests: add a test to show issue5441 in test-topic.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2045
diff changeset
786 | summary: fran?
a263f4c0f2ee tests: add a test to show issue5441 in test-topic.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2045
diff changeset
787 |
2649
cf930521f14d topics: add some noise to rewrittent changeset to prevent hash cycle
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2648
diff changeset
788 o changeset: 13:686a642006db
2623
a263f4c0f2ee tests: add a test to show issue5441 in test-topic.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2045
diff changeset
789 | topic: wat
a263f4c0f2ee tests: add a test to show issue5441 in test-topic.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2045
diff changeset
790 | parent: 3:a53952faf762
a263f4c0f2ee tests: add a test to show issue5441 in test-topic.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2045
diff changeset
791 | user: test
a263f4c0f2ee tests: add a test to show issue5441 in test-topic.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2045
diff changeset
792 | date: Thu Jan 01 00:00:00 1970 +0000
a263f4c0f2ee tests: add a test to show issue5441 in test-topic.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2045
diff changeset
793 | summary: start on fran
a263f4c0f2ee tests: add a test to show issue5441 in test-topic.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2045
diff changeset
794 |
a263f4c0f2ee tests: add a test to show issue5441 in test-topic.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2045
diff changeset
795
2869
b629874ccaac topics: allow use a --current when setting a topic
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2868
diff changeset
796 Using the current flag
b629874ccaac topics: allow use a --current when setting a topic
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2868
diff changeset
797
b629874ccaac topics: allow use a --current when setting a topic
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2868
diff changeset
798 $ hg topic changewat
2929
06844693bb21 tests: update after removing of redundant amend commit
Boris Feld <boris.feld@octobus.net>
parents: 2923
diff changeset
799 $ hg topics --rev '13::17' --current
2988
62201935e1a7 topics/ui: detect and signal when an empty changeset becomes non-empty
Aurélien Campéas
parents: 2986
diff changeset
800 active topic 'changewat' grew its 2 first changesets
2623
a263f4c0f2ee tests: add a test to show issue5441 in test-topic.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2045
diff changeset
801 changed topic on 2 changes
2860
27ae7afd9a2a tests: add whitespaces in test-topic.t to make it more readable
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2834
diff changeset
802
2623
a263f4c0f2ee tests: add a test to show issue5441 in test-topic.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2045
diff changeset
803 $ hg log -Gr 'draft()'
2929
06844693bb21 tests: update after removing of redundant amend commit
Boris Feld <boris.feld@octobus.net>
parents: 2923
diff changeset
804 @ changeset: 19:56c83be6105f
2623
a263f4c0f2ee tests: add a test to show issue5441 in test-topic.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2045
diff changeset
805 | tag: tip
a263f4c0f2ee tests: add a test to show issue5441 in test-topic.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2045
diff changeset
806 | topic: changewat
a263f4c0f2ee tests: add a test to show issue5441 in test-topic.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2045
diff changeset
807 | user: test
a263f4c0f2ee tests: add a test to show issue5441 in test-topic.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2045
diff changeset
808 | date: Thu Jan 01 00:00:00 1970 +0000
a263f4c0f2ee tests: add a test to show issue5441 in test-topic.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2045
diff changeset
809 | summary: fran?
a263f4c0f2ee tests: add a test to show issue5441 in test-topic.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2045
diff changeset
810 |
2929
06844693bb21 tests: update after removing of redundant amend commit
Boris Feld <boris.feld@octobus.net>
parents: 2923
diff changeset
811 o changeset: 18:ceba5be9d56f
2624
fd602980f7ee topics: make sure we commit on new parents while changing topics (issue5441)
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2623
diff changeset
812 | topic: changewat
fd602980f7ee topics: make sure we commit on new parents while changing topics (issue5441)
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2623
diff changeset
813 | parent: 3:a53952faf762
fd602980f7ee topics: make sure we commit on new parents while changing topics (issue5441)
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2623
diff changeset
814 | user: test
fd602980f7ee topics: make sure we commit on new parents while changing topics (issue5441)
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2623
diff changeset
815 | date: Thu Jan 01 00:00:00 1970 +0000
fd602980f7ee topics: make sure we commit on new parents while changing topics (issue5441)
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2623
diff changeset
816 | summary: start on fran
fd602980f7ee topics: make sure we commit on new parents while changing topics (issue5441)
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2623
diff changeset
817 |
2646
b5723184fc62 topics: use a dict for successors of changesets produced by topic change
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2643
diff changeset
818
b5723184fc62 topics: use a dict for successors of changesets produced by topic change
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2643
diff changeset
819 Case with branching:
b5723184fc62 topics: use a dict for successors of changesets produced by topic change
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2643
diff changeset
820
b5723184fc62 topics: use a dict for successors of changesets produced by topic change
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2643
diff changeset
821 $ hg up changewat
b5723184fc62 topics: use a dict for successors of changesets produced by topic change
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2643
diff changeset
822 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
b5723184fc62 topics: use a dict for successors of changesets produced by topic change
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2643
diff changeset
823 $ hg up t1
b5723184fc62 topics: use a dict for successors of changesets produced by topic change
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2643
diff changeset
824 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
b5723184fc62 topics: use a dict for successors of changesets produced by topic change
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2643
diff changeset
825 $ echo gamma >> gamma
b5723184fc62 topics: use a dict for successors of changesets produced by topic change
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2643
diff changeset
826 $ hg ci -m gamma
2860
27ae7afd9a2a tests: add whitespaces in test-topic.t to make it more readable
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2834
diff changeset
827
2646
b5723184fc62 topics: use a dict for successors of changesets produced by topic change
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2643
diff changeset
828 $ hg log -Gr 'draft()'
2929
06844693bb21 tests: update after removing of redundant amend commit
Boris Feld <boris.feld@octobus.net>
parents: 2923
diff changeset
829 @ changeset: 20:0d3d805542b4
2646
b5723184fc62 topics: use a dict for successors of changesets produced by topic change
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2643
diff changeset
830 | tag: tip
b5723184fc62 topics: use a dict for successors of changesets produced by topic change
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2643
diff changeset
831 | topic: changewat
2929
06844693bb21 tests: update after removing of redundant amend commit
Boris Feld <boris.feld@octobus.net>
parents: 2923
diff changeset
832 | parent: 18:ceba5be9d56f
2646
b5723184fc62 topics: use a dict for successors of changesets produced by topic change
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2643
diff changeset
833 | user: test
b5723184fc62 topics: use a dict for successors of changesets produced by topic change
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2643
diff changeset
834 | date: Thu Jan 01 00:00:00 1970 +0000
b5723184fc62 topics: use a dict for successors of changesets produced by topic change
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2643
diff changeset
835 | summary: gamma
b5723184fc62 topics: use a dict for successors of changesets produced by topic change
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2643
diff changeset
836 |
2929
06844693bb21 tests: update after removing of redundant amend commit
Boris Feld <boris.feld@octobus.net>
parents: 2923
diff changeset
837 | o changeset: 19:56c83be6105f
2646
b5723184fc62 topics: use a dict for successors of changesets produced by topic change
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2643
diff changeset
838 |/ topic: changewat
b5723184fc62 topics: use a dict for successors of changesets produced by topic change
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2643
diff changeset
839 | user: test
b5723184fc62 topics: use a dict for successors of changesets produced by topic change
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2643
diff changeset
840 | date: Thu Jan 01 00:00:00 1970 +0000
b5723184fc62 topics: use a dict for successors of changesets produced by topic change
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2643
diff changeset
841 | summary: fran?
b5723184fc62 topics: use a dict for successors of changesets produced by topic change
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2643
diff changeset
842 |
2929
06844693bb21 tests: update after removing of redundant amend commit
Boris Feld <boris.feld@octobus.net>
parents: 2923
diff changeset
843 o changeset: 18:ceba5be9d56f
2646
b5723184fc62 topics: use a dict for successors of changesets produced by topic change
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2643
diff changeset
844 | topic: changewat
b5723184fc62 topics: use a dict for successors of changesets produced by topic change
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2643
diff changeset
845 | parent: 3:a53952faf762
b5723184fc62 topics: use a dict for successors of changesets produced by topic change
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2643
diff changeset
846 | user: test
b5723184fc62 topics: use a dict for successors of changesets produced by topic change
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2643
diff changeset
847 | date: Thu Jan 01 00:00:00 1970 +0000
b5723184fc62 topics: use a dict for successors of changesets produced by topic change
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2643
diff changeset
848 | summary: start on fran
b5723184fc62 topics: use a dict for successors of changesets produced by topic change
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2643
diff changeset
849 |
2860
27ae7afd9a2a tests: add whitespaces in test-topic.t to make it more readable
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2834
diff changeset
850
2646
b5723184fc62 topics: use a dict for successors of changesets produced by topic change
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2643
diff changeset
851 $ hg topics --rev 't1::' changewut
2648
d8b47d961c77 topic-change: update the working copy along when changing topic of '.'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2646
diff changeset
852 switching to topic changewut
2988
62201935e1a7 topics/ui: detect and signal when an empty changeset becomes non-empty
Aurélien Campéas
parents: 2986
diff changeset
853 active topic 'changewat' is now empty
2646
b5723184fc62 topics: use a dict for successors of changesets produced by topic change
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2643
diff changeset
854 changed topic on 3 changes
2860
27ae7afd9a2a tests: add whitespaces in test-topic.t to make it more readable
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2834
diff changeset
855
2646
b5723184fc62 topics: use a dict for successors of changesets produced by topic change
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2643
diff changeset
856 $ hg log -Gr 'draft()'
2929
06844693bb21 tests: update after removing of redundant amend commit
Boris Feld <boris.feld@octobus.net>
parents: 2923
diff changeset
857 @ changeset: 23:729ed5717393
2646
b5723184fc62 topics: use a dict for successors of changesets produced by topic change
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2643
diff changeset
858 | tag: tip
b5723184fc62 topics: use a dict for successors of changesets produced by topic change
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2643
diff changeset
859 | topic: changewut
2929
06844693bb21 tests: update after removing of redundant amend commit
Boris Feld <boris.feld@octobus.net>
parents: 2923
diff changeset
860 | parent: 21:62e49f09f883
2646
b5723184fc62 topics: use a dict for successors of changesets produced by topic change
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2643
diff changeset
861 | user: test
b5723184fc62 topics: use a dict for successors of changesets produced by topic change
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2643
diff changeset
862 | date: Thu Jan 01 00:00:00 1970 +0000
b5723184fc62 topics: use a dict for successors of changesets produced by topic change
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2643
diff changeset
863 | summary: gamma
b5723184fc62 topics: use a dict for successors of changesets produced by topic change
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2643
diff changeset
864 |
2929
06844693bb21 tests: update after removing of redundant amend commit
Boris Feld <boris.feld@octobus.net>
parents: 2923
diff changeset
865 | o changeset: 22:369c6e2e5474
2646
b5723184fc62 topics: use a dict for successors of changesets produced by topic change
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2643
diff changeset
866 |/ topic: changewut
b5723184fc62 topics: use a dict for successors of changesets produced by topic change
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2643
diff changeset
867 | user: test
b5723184fc62 topics: use a dict for successors of changesets produced by topic change
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2643
diff changeset
868 | date: Thu Jan 01 00:00:00 1970 +0000
b5723184fc62 topics: use a dict for successors of changesets produced by topic change
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2643
diff changeset
869 | summary: fran?
b5723184fc62 topics: use a dict for successors of changesets produced by topic change
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2643
diff changeset
870 |
2929
06844693bb21 tests: update after removing of redundant amend commit
Boris Feld <boris.feld@octobus.net>
parents: 2923
diff changeset
871 o changeset: 21:62e49f09f883
2646
b5723184fc62 topics: use a dict for successors of changesets produced by topic change
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2643
diff changeset
872 | topic: changewut
b5723184fc62 topics: use a dict for successors of changesets produced by topic change
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2643
diff changeset
873 | parent: 3:a53952faf762
b5723184fc62 topics: use a dict for successors of changesets produced by topic change
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2643
diff changeset
874 | user: test
b5723184fc62 topics: use a dict for successors of changesets produced by topic change
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2643
diff changeset
875 | date: Thu Jan 01 00:00:00 1970 +0000
b5723184fc62 topics: use a dict for successors of changesets produced by topic change
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2643
diff changeset
876 | summary: start on fran
b5723184fc62 topics: use a dict for successors of changesets produced by topic change
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2643
diff changeset
877 |
2712
f19b314d8475 topics: add t0 and b0 to the stack
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2691
diff changeset
878
f19b314d8475 topics: add t0 and b0 to the stack
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2691
diff changeset
879 Testing for updating to t0
f19b314d8475 topics: add t0 and b0 to the stack
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2691
diff changeset
880 ==========================
f19b314d8475 topics: add t0 and b0 to the stack
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2691
diff changeset
881
f19b314d8475 topics: add t0 and b0 to the stack
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2691
diff changeset
882 $ hg stack
f19b314d8475 topics: add t0 and b0 to the stack
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2691
diff changeset
883 ### topic: changewut (2 heads)
f19b314d8475 topics: add t0 and b0 to the stack
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2691
diff changeset
884 ### branch: default, 5 behind
f19b314d8475 topics: add t0 and b0 to the stack
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2691
diff changeset
885 t3: fran?
f19b314d8475 topics: add t0 and b0 to the stack
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2691
diff changeset
886 t1^ start on fran (base)
f19b314d8475 topics: add t0 and b0 to the stack
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2691
diff changeset
887 t2@ gamma (current)
f19b314d8475 topics: add t0 and b0 to the stack
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2691
diff changeset
888 t1: start on fran
f19b314d8475 topics: add t0 and b0 to the stack
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2691
diff changeset
889 t0^ Add file delta (base)
2860
27ae7afd9a2a tests: add whitespaces in test-topic.t to make it more readable
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2834
diff changeset
890
2712
f19b314d8475 topics: add t0 and b0 to the stack
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2691
diff changeset
891 $ hg up t0
f19b314d8475 topics: add t0 and b0 to the stack
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2691
diff changeset
892 preserving the current topic 'changewut'
f19b314d8475 topics: add t0 and b0 to the stack
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2691
diff changeset
893 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
2860
27ae7afd9a2a tests: add whitespaces in test-topic.t to make it more readable
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2834
diff changeset
894
2712
f19b314d8475 topics: add t0 and b0 to the stack
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2691
diff changeset
895 $ hg topic
f19b314d8475 topics: add t0 and b0 to the stack
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2691
diff changeset
896 * changewut
f19b314d8475 topics: add t0 and b0 to the stack
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2691
diff changeset
897 $ hg stack
f19b314d8475 topics: add t0 and b0 to the stack
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2691
diff changeset
898 ### topic: changewut (2 heads)
f19b314d8475 topics: add t0 and b0 to the stack
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2691
diff changeset
899 ### branch: default, 5 behind
f19b314d8475 topics: add t0 and b0 to the stack
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2691
diff changeset
900 t3: fran?
f19b314d8475 topics: add t0 and b0 to the stack
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2691
diff changeset
901 t1^ start on fran (base)
f19b314d8475 topics: add t0 and b0 to the stack
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2691
diff changeset
902 t2: gamma
f19b314d8475 topics: add t0 and b0 to the stack
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2691
diff changeset
903 t1: start on fran
f19b314d8475 topics: add t0 and b0 to the stack
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2691
diff changeset
904 t0^ Add file delta (base)
2718
b6fa7b3e13d4 topics: add a config knob to forbid untopiced commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2717
diff changeset
905
2731
d39942773163 topics: add a new flag --age which will show last touched time for topics
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2718
diff changeset
906 $ hg topics --age
d39942773163 topics: add a new flag --age which will show last touched time for topics
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2718
diff changeset
907 * changewut (1970-01-01)
d39942773163 topics: add a new flag --age which will show last touched time for topics
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2718
diff changeset
908
2718
b6fa7b3e13d4 topics: add a config knob to forbid untopiced commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2717
diff changeset
909 $ cd ..
b6fa7b3e13d4 topics: add a config knob to forbid untopiced commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2717
diff changeset
910
b6fa7b3e13d4 topics: add a config knob to forbid untopiced commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2717
diff changeset
911 Testing the new config knob to forbid untopiced commit
b6fa7b3e13d4 topics: add a config knob to forbid untopiced commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2717
diff changeset
912 ======================================================
b6fa7b3e13d4 topics: add a config knob to forbid untopiced commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2717
diff changeset
913
b6fa7b3e13d4 topics: add a config knob to forbid untopiced commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2717
diff changeset
914 $ hg init ponky
b6fa7b3e13d4 topics: add a config knob to forbid untopiced commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2717
diff changeset
915 $ cd ponky
b6fa7b3e13d4 topics: add a config knob to forbid untopiced commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2717
diff changeset
916 $ cat <<EOF >> .hg/hgrc
b6fa7b3e13d4 topics: add a config knob to forbid untopiced commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2717
diff changeset
917 > [phases]
b6fa7b3e13d4 topics: add a config knob to forbid untopiced commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2717
diff changeset
918 > publish=false
b6fa7b3e13d4 topics: add a config knob to forbid untopiced commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2717
diff changeset
919 > EOF
b6fa7b3e13d4 topics: add a config knob to forbid untopiced commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2717
diff changeset
920 $ cat <<EOF >> $HGRCPATH
b6fa7b3e13d4 topics: add a config knob to forbid untopiced commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2717
diff changeset
921 > [experimental]
b6fa7b3e13d4 topics: add a config knob to forbid untopiced commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2717
diff changeset
922 > enforce-topic = yes
b6fa7b3e13d4 topics: add a config knob to forbid untopiced commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2717
diff changeset
923 > EOF
b6fa7b3e13d4 topics: add a config knob to forbid untopiced commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2717
diff changeset
924 $ touch a b c d
b6fa7b3e13d4 topics: add a config knob to forbid untopiced commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2717
diff changeset
925 $ hg add a
b6fa7b3e13d4 topics: add a config knob to forbid untopiced commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2717
diff changeset
926 $ hg ci -m "Added a"
b6fa7b3e13d4 topics: add a config knob to forbid untopiced commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2717
diff changeset
927 abort: no active topic
b6fa7b3e13d4 topics: add a config knob to forbid untopiced commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2717
diff changeset
928 (set a current topic or use '--config experimental.enforce-topic=no' to commit without a topic)
b6fa7b3e13d4 topics: add a config knob to forbid untopiced commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2717
diff changeset
929 [255]
2733
adfbb984ebbb topics: check for topic on commit before a user enters message
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2731
diff changeset
930
adfbb984ebbb topics: check for topic on commit before a user enters message
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2731
diff changeset
931 (same test, checking we abort before the editor)
adfbb984ebbb topics: check for topic on commit before a user enters message
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2731
diff changeset
932
adfbb984ebbb topics: check for topic on commit before a user enters message
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2731
diff changeset
933 $ EDITOR=cat hg ci -m "Added a" --edit
adfbb984ebbb topics: check for topic on commit before a user enters message
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2731
diff changeset
934 abort: no active topic
adfbb984ebbb topics: check for topic on commit before a user enters message
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2731
diff changeset
935 (set a current topic or use '--config experimental.enforce-topic=no' to commit without a topic)
adfbb984ebbb topics: check for topic on commit before a user enters message
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2731
diff changeset
936 [255]
2718
b6fa7b3e13d4 topics: add a config knob to forbid untopiced commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2717
diff changeset
937 $ hg ci -m "added a" --config experimental.enforce-topic=no
b6fa7b3e13d4 topics: add a config knob to forbid untopiced commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2717
diff changeset
938 $ hg log
b6fa7b3e13d4 topics: add a config knob to forbid untopiced commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2717
diff changeset
939 changeset: 0:a154386e50d1
b6fa7b3e13d4 topics: add a config knob to forbid untopiced commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2717
diff changeset
940 tag: tip
b6fa7b3e13d4 topics: add a config knob to forbid untopiced commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2717
diff changeset
941 user: test
b6fa7b3e13d4 topics: add a config knob to forbid untopiced commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2717
diff changeset
942 date: Thu Jan 01 00:00:00 1970 +0000
b6fa7b3e13d4 topics: add a config knob to forbid untopiced commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2717
diff changeset
943 summary: added a
b6fa7b3e13d4 topics: add a config knob to forbid untopiced commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2717
diff changeset
944
2860
27ae7afd9a2a tests: add whitespaces in test-topic.t to make it more readable
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2834
diff changeset
945 Testing the --age flag for `hg topics`
27ae7afd9a2a tests: add whitespaces in test-topic.t to make it more readable
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2834
diff changeset
946 ======================================
27ae7afd9a2a tests: add whitespaces in test-topic.t to make it more readable
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2834
diff changeset
947
2747
9fd6c8efda5b topics: add a test demonstarting sorting of topics by time using --age
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2733
diff changeset
948 $ hg topic topic1970 --rev 0
9fd6c8efda5b topics: add a test demonstarting sorting of topics by time using --age
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2733
diff changeset
949 switching to topic topic1970
9fd6c8efda5b topics: add a test demonstarting sorting of topics by time using --age
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2733
diff changeset
950 changed topic on 1 changes
2860
27ae7afd9a2a tests: add whitespaces in test-topic.t to make it more readable
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2834
diff changeset
951
2747
9fd6c8efda5b topics: add a test demonstarting sorting of topics by time using --age
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2733
diff changeset
952 $ hg add b
9fd6c8efda5b topics: add a test demonstarting sorting of topics by time using --age
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2733
diff changeset
953 $ hg topic topic1990
9fd6c8efda5b topics: add a test demonstarting sorting of topics by time using --age
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2733
diff changeset
954 $ hg ci -m "Added b" --config devel.default-date="631152000 0"
2988
62201935e1a7 topics/ui: detect and signal when an empty changeset becomes non-empty
Aurélien Campéas
parents: 2986
diff changeset
955 active topic 'topic1990' grew its first changeset
2747
9fd6c8efda5b topics: add a test demonstarting sorting of topics by time using --age
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2733
diff changeset
956 $ hg add c
9fd6c8efda5b topics: add a test demonstarting sorting of topics by time using --age
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2733
diff changeset
957 $ hg topic topic2010
9fd6c8efda5b topics: add a test demonstarting sorting of topics by time using --age
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2733
diff changeset
958 $ hg ci -m "Added c" --config devel.default-date="1262304000 0"
2988
62201935e1a7 topics/ui: detect and signal when an empty changeset becomes non-empty
Aurélien Campéas
parents: 2986
diff changeset
959 active topic 'topic2010' grew its first changeset
2860
27ae7afd9a2a tests: add whitespaces in test-topic.t to make it more readable
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2834
diff changeset
960
27ae7afd9a2a tests: add whitespaces in test-topic.t to make it more readable
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2834
diff changeset
961 $ hg log -G
27ae7afd9a2a tests: add whitespaces in test-topic.t to make it more readable
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2834
diff changeset
962 @ changeset: 3:9048b194797d
27ae7afd9a2a tests: add whitespaces in test-topic.t to make it more readable
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2834
diff changeset
963 | tag: tip
27ae7afd9a2a tests: add whitespaces in test-topic.t to make it more readable
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2834
diff changeset
964 | topic: topic2010
27ae7afd9a2a tests: add whitespaces in test-topic.t to make it more readable
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2834
diff changeset
965 | user: test
27ae7afd9a2a tests: add whitespaces in test-topic.t to make it more readable
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2834
diff changeset
966 | date: Fri Jan 01 00:00:00 2010 +0000
27ae7afd9a2a tests: add whitespaces in test-topic.t to make it more readable
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2834
diff changeset
967 | summary: Added c
27ae7afd9a2a tests: add whitespaces in test-topic.t to make it more readable
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2834
diff changeset
968 |
27ae7afd9a2a tests: add whitespaces in test-topic.t to make it more readable
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2834
diff changeset
969 o changeset: 2:186d493c7f8d
27ae7afd9a2a tests: add whitespaces in test-topic.t to make it more readable
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2834
diff changeset
970 | topic: topic1990
27ae7afd9a2a tests: add whitespaces in test-topic.t to make it more readable
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2834
diff changeset
971 | user: test
27ae7afd9a2a tests: add whitespaces in test-topic.t to make it more readable
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2834
diff changeset
972 | date: Mon Jan 01 00:00:00 1990 +0000
27ae7afd9a2a tests: add whitespaces in test-topic.t to make it more readable
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2834
diff changeset
973 | summary: Added b
27ae7afd9a2a tests: add whitespaces in test-topic.t to make it more readable
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2834
diff changeset
974 |
27ae7afd9a2a tests: add whitespaces in test-topic.t to make it more readable
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2834
diff changeset
975 o changeset: 1:e5a30a141954
27ae7afd9a2a tests: add whitespaces in test-topic.t to make it more readable
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2834
diff changeset
976 topic: topic1970
27ae7afd9a2a tests: add whitespaces in test-topic.t to make it more readable
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2834
diff changeset
977 parent: -1:000000000000
27ae7afd9a2a tests: add whitespaces in test-topic.t to make it more readable
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2834
diff changeset
978 user: test
27ae7afd9a2a tests: add whitespaces in test-topic.t to make it more readable
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2834
diff changeset
979 date: Thu Jan 01 00:00:00 1970 +0000
27ae7afd9a2a tests: add whitespaces in test-topic.t to make it more readable
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2834
diff changeset
980 summary: added a
2747
9fd6c8efda5b topics: add a test demonstarting sorting of topics by time using --age
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2733
diff changeset
981
9fd6c8efda5b topics: add a test demonstarting sorting of topics by time using --age
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2733
diff changeset
982 $ hg topics
9fd6c8efda5b topics: add a test demonstarting sorting of topics by time using --age
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2733
diff changeset
983 topic1970
9fd6c8efda5b topics: add a test demonstarting sorting of topics by time using --age
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2733
diff changeset
984 topic1990
9fd6c8efda5b topics: add a test demonstarting sorting of topics by time using --age
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2733
diff changeset
985 * topic2010
2860
27ae7afd9a2a tests: add whitespaces in test-topic.t to make it more readable
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2834
diff changeset
986
2747
9fd6c8efda5b topics: add a test demonstarting sorting of topics by time using --age
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2733
diff changeset
987 $ hg topics --age
9fd6c8efda5b topics: add a test demonstarting sorting of topics by time using --age
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2733
diff changeset
988 * topic2010 (2010-01-01)
9fd6c8efda5b topics: add a test demonstarting sorting of topics by time using --age
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2733
diff changeset
989 topic1990 (1990-01-01)
9fd6c8efda5b topics: add a test demonstarting sorting of topics by time using --age
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2733
diff changeset
990 topic1970 (1970-01-01)
2860
27ae7afd9a2a tests: add whitespaces in test-topic.t to make it more readable
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2834
diff changeset
991
2747
9fd6c8efda5b topics: add a test demonstarting sorting of topics by time using --age
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2733
diff changeset
992 $ hg up topic1970
9fd6c8efda5b topics: add a test demonstarting sorting of topics by time using --age
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2733
diff changeset
993 switching to topic topic1970
9fd6c8efda5b topics: add a test demonstarting sorting of topics by time using --age
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2733
diff changeset
994 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
2860
27ae7afd9a2a tests: add whitespaces in test-topic.t to make it more readable
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2834
diff changeset
995
2747
9fd6c8efda5b topics: add a test demonstarting sorting of topics by time using --age
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2733
diff changeset
996 $ hg topics --age
9fd6c8efda5b topics: add a test demonstarting sorting of topics by time using --age
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2733
diff changeset
997 topic2010 (2010-01-01)
9fd6c8efda5b topics: add a test demonstarting sorting of topics by time using --age
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2733
diff changeset
998 topic1990 (1990-01-01)
9fd6c8efda5b topics: add a test demonstarting sorting of topics by time using --age
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2733
diff changeset
999 * topic1970 (1970-01-01)
9fd6c8efda5b topics: add a test demonstarting sorting of topics by time using --age
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2733
diff changeset
1000
2718
b6fa7b3e13d4 topics: add a config knob to forbid untopiced commit
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2717
diff changeset
1001 $ cd ..