author | Bryan O'Sullivan <bryano@fb.com> |
Mon, 11 Mar 2013 12:06:13 -0700 | |
changeset 18775 | 5b05ceb24a8d |
parent 18382 | f3b21beb9802 |
child 20185 | 7d4219512823 |
permissions | -rw-r--r-- |
13272
5ccdca7df211
move tags.cache and branchheads.cache to a collected cache folder .hg/cache/
jfh <jason@jasonfharris.com>
parents:
13158
diff
changeset
|
1 |
$ branchcache=.hg/cache/branchheads |
3420
2576b6731524
Add some basic branch name tests
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
2 |
|
18234
a55b06885cda
branchmap: allow to use cache of subset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
18166
diff
changeset
|
3 |
$ listbranchcaches() { |
a55b06885cda
branchmap: allow to use cache of subset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
18166
diff
changeset
|
4 |
> for f in .hg/cache/branchheads*; |
a55b06885cda
branchmap: allow to use cache of subset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
18166
diff
changeset
|
5 |
> do echo === $f ===; |
a55b06885cda
branchmap: allow to use cache of subset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
18166
diff
changeset
|
6 |
> cat $f; |
a55b06885cda
branchmap: allow to use cache of subset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
18166
diff
changeset
|
7 |
> done; |
a55b06885cda
branchmap: allow to use cache of subset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
18166
diff
changeset
|
8 |
> } |
a55b06885cda
branchmap: allow to use cache of subset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
18166
diff
changeset
|
9 |
$ purgebranchcaches() { |
a55b06885cda
branchmap: allow to use cache of subset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
18166
diff
changeset
|
10 |
> rm .hg/cache/branchheads* |
a55b06885cda
branchmap: allow to use cache of subset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
18166
diff
changeset
|
11 |
> } |
a55b06885cda
branchmap: allow to use cache of subset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
18166
diff
changeset
|
12 |
|
12279 | 13 |
$ hg init t |
14 |
$ cd t |
|
6160
3ee3bc5d06c5
tests: hide the name of the branch cache file
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
5988
diff
changeset
|
15 |
|
12279 | 16 |
$ hg branches |
17 |
$ echo foo > a |
|
18 |
$ hg add a |
|
19 |
$ hg ci -m "initial" |
|
20 |
$ hg branch foo |
|
21 |
marked working directory as branch foo |
|
15615 | 22 |
(branches are permanent and global, did you want a bookmark?) |
12279 | 23 |
$ hg branch |
24 |
foo |
|
25 |
$ hg ci -m "add branch name" |
|
26 |
$ hg branch bar |
|
27 |
marked working directory as branch bar |
|
15615 | 28 |
(branches are permanent and global, did you want a bookmark?) |
12279 | 29 |
$ hg ci -m "change branch name" |
30 |
||
31 |
Branch shadowing: |
|
32 |
||
33 |
$ hg branch default |
|
14198
8f11fd321014
commands: use util.Abort's hint some more
Martin Geisler <mg@aragost.com>
parents:
14162
diff
changeset
|
34 |
abort: a branch of the same name already exists |
8f11fd321014
commands: use util.Abort's hint some more
Martin Geisler <mg@aragost.com>
parents:
14162
diff
changeset
|
35 |
(use 'hg update' to switch to it) |
12316
4134686b83e1
tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents:
12279
diff
changeset
|
36 |
[255] |
12279 | 37 |
|
38 |
$ hg branch -f default |
|
39 |
marked working directory as branch default |
|
15615 | 40 |
(branches are permanent and global, did you want a bookmark?) |
3420
2576b6731524
Add some basic branch name tests
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
41 |
|
12279 | 42 |
$ hg ci -m "clear branch name" |
43 |
created new head |
|
44 |
||
45 |
There should be only one default branch head |
|
46 |
||
47 |
$ hg heads . |
|
14162
301725c3df9a
localrepo: reuse parent manifest in commitctx if no files have changed
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
13550
diff
changeset
|
48 |
changeset: 3:1c28f494dae6 |
12279 | 49 |
tag: tip |
50 |
user: test |
|
51 |
date: Thu Jan 01 00:00:00 1970 +0000 |
|
52 |
summary: clear branch name |
|
53 |
||
3420
2576b6731524
Add some basic branch name tests
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
54 |
|
12279 | 55 |
$ hg co foo |
56 |
0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
57 |
$ hg branch |
|
58 |
foo |
|
59 |
$ echo bleah > a |
|
60 |
$ hg ci -m "modify a branch" |
|
61 |
||
62 |
$ hg merge default |
|
63 |
0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
64 |
(branch merge, don't forget to commit) |
|
65 |
||
66 |
$ hg branch |
|
67 |
foo |
|
68 |
$ hg ci -m "merge" |
|
8954
e67e5b60e55f
Branch heads should not include "heads" that are ancestors of other heads.
Brendan Cully <brendan@kublai.com>
parents:
7654
diff
changeset
|
69 |
|
12279 | 70 |
$ hg log |
14162
301725c3df9a
localrepo: reuse parent manifest in commitctx if no files have changed
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
13550
diff
changeset
|
71 |
changeset: 5:530046499edf |
12279 | 72 |
branch: foo |
73 |
tag: tip |
|
14162
301725c3df9a
localrepo: reuse parent manifest in commitctx if no files have changed
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
13550
diff
changeset
|
74 |
parent: 4:adf1a74a7f7b |
301725c3df9a
localrepo: reuse parent manifest in commitctx if no files have changed
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
13550
diff
changeset
|
75 |
parent: 3:1c28f494dae6 |
12279 | 76 |
user: test |
77 |
date: Thu Jan 01 00:00:00 1970 +0000 |
|
78 |
summary: merge |
|
79 |
||
14162
301725c3df9a
localrepo: reuse parent manifest in commitctx if no files have changed
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
13550
diff
changeset
|
80 |
changeset: 4:adf1a74a7f7b |
12279 | 81 |
branch: foo |
14162
301725c3df9a
localrepo: reuse parent manifest in commitctx if no files have changed
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
13550
diff
changeset
|
82 |
parent: 1:6c0e42da283a |
12279 | 83 |
user: test |
84 |
date: Thu Jan 01 00:00:00 1970 +0000 |
|
85 |
summary: modify a branch |
|
86 |
||
14162
301725c3df9a
localrepo: reuse parent manifest in commitctx if no files have changed
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
13550
diff
changeset
|
87 |
changeset: 3:1c28f494dae6 |
12279 | 88 |
user: test |
89 |
date: Thu Jan 01 00:00:00 1970 +0000 |
|
90 |
summary: clear branch name |
|
91 |
||
14162
301725c3df9a
localrepo: reuse parent manifest in commitctx if no files have changed
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
13550
diff
changeset
|
92 |
changeset: 2:c21617b13b22 |
12279 | 93 |
branch: bar |
94 |
user: test |
|
95 |
date: Thu Jan 01 00:00:00 1970 +0000 |
|
96 |
summary: change branch name |
|
97 |
||
14162
301725c3df9a
localrepo: reuse parent manifest in commitctx if no files have changed
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
13550
diff
changeset
|
98 |
changeset: 1:6c0e42da283a |
12279 | 99 |
branch: foo |
100 |
user: test |
|
101 |
date: Thu Jan 01 00:00:00 1970 +0000 |
|
102 |
summary: add branch name |
|
103 |
||
104 |
changeset: 0:db01e8ea3388 |
|
105 |
user: test |
|
106 |
date: Thu Jan 01 00:00:00 1970 +0000 |
|
107 |
summary: initial |
|
108 |
||
109 |
$ hg branches |
|
14162
301725c3df9a
localrepo: reuse parent manifest in commitctx if no files have changed
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
13550
diff
changeset
|
110 |
foo 5:530046499edf |
301725c3df9a
localrepo: reuse parent manifest in commitctx if no files have changed
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
13550
diff
changeset
|
111 |
default 3:1c28f494dae6 (inactive) |
301725c3df9a
localrepo: reuse parent manifest in commitctx if no files have changed
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
13550
diff
changeset
|
112 |
bar 2:c21617b13b22 (inactive) |
3420
2576b6731524
Add some basic branch name tests
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
113 |
|
12279 | 114 |
$ hg branches -q |
115 |
foo |
|
116 |
default |
|
117 |
bar |
|
3420
2576b6731524
Add some basic branch name tests
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
118 |
|
12279 | 119 |
Test for invalid branch cache: |
3502
8dc14d630b29
add branch and branches commands
Matt Mackall <mpm@selenic.com>
parents:
3451
diff
changeset
|
120 |
|
12279 | 121 |
$ hg rollback |
13446
1e497df514e2
rollback: clarifies the message about the reverted state (issue2628)
Gilles Moris <gilles.moris@free.fr>
parents:
13272
diff
changeset
|
122 |
repository tip rolled back to revision 4 (undo commit) |
13455
053c042118bc
rollback, i18n: avoid parameterized message
Wagner Bruna <wbruna@softwareexpress.com.br>
parents:
13446
diff
changeset
|
123 |
working directory now based on revisions 4 and 3 |
12279 | 124 |
|
18382
f3b21beb9802
filtering: rename filters to their antonyms
Kevin Bullock <kbullock@ringworld.org>
parents:
18357
diff
changeset
|
125 |
$ cp ${branchcache}-served .hg/bc-invalid |
12279 | 126 |
|
127 |
$ hg log -r foo |
|
14162
301725c3df9a
localrepo: reuse parent manifest in commitctx if no files have changed
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
13550
diff
changeset
|
128 |
changeset: 4:adf1a74a7f7b |
12279 | 129 |
branch: foo |
130 |
tag: tip |
|
14162
301725c3df9a
localrepo: reuse parent manifest in commitctx if no files have changed
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
13550
diff
changeset
|
131 |
parent: 1:6c0e42da283a |
12279 | 132 |
user: test |
133 |
date: Thu Jan 01 00:00:00 1970 +0000 |
|
134 |
summary: modify a branch |
|
135 |
||
136 |
$ cp .hg/bc-invalid $branchcache |
|
4175
fc12ac3755d5
Test update to branch tip
Brendan Cully <brendan@kublai.com>
parents:
4169
diff
changeset
|
137 |
|
12279 | 138 |
$ hg --debug log -r foo |
14162
301725c3df9a
localrepo: reuse parent manifest in commitctx if no files have changed
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
13550
diff
changeset
|
139 |
changeset: 4:adf1a74a7f7b4cd193d12992f5d0d6a004ed21d6 |
12279 | 140 |
branch: foo |
141 |
tag: tip |
|
15907
51fc43253a52
changeset_printer: display changeset phase on debug level
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
15615
diff
changeset
|
142 |
phase: draft |
14162
301725c3df9a
localrepo: reuse parent manifest in commitctx if no files have changed
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
13550
diff
changeset
|
143 |
parent: 1:6c0e42da283a56b5edc5b4fadb491365ec7f5fa8 |
12279 | 144 |
parent: -1:0000000000000000000000000000000000000000 |
14162
301725c3df9a
localrepo: reuse parent manifest in commitctx if no files have changed
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
13550
diff
changeset
|
145 |
manifest: 1:8c342a37dfba0b3d3ce073562a00d8a813c54ffe |
12279 | 146 |
user: test |
147 |
date: Thu Jan 01 00:00:00 1970 +0000 |
|
148 |
files: a |
|
149 |
extra: branch=foo |
|
150 |
description: |
|
151 |
modify a branch |
|
152 |
||
153 |
||
18234
a55b06885cda
branchmap: allow to use cache of subset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
18166
diff
changeset
|
154 |
$ purgebranchcaches |
12279 | 155 |
$ echo corrupted > $branchcache |
156 |
||
157 |
$ hg log -qr foo |
|
14162
301725c3df9a
localrepo: reuse parent manifest in commitctx if no files have changed
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
13550
diff
changeset
|
158 |
4:adf1a74a7f7b |
12279 | 159 |
|
18234
a55b06885cda
branchmap: allow to use cache of subset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
18166
diff
changeset
|
160 |
$ listbranchcaches |
a55b06885cda
branchmap: allow to use cache of subset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
18166
diff
changeset
|
161 |
=== .hg/cache/branchheads === |
a55b06885cda
branchmap: allow to use cache of subset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
18166
diff
changeset
|
162 |
corrupted |
18382
f3b21beb9802
filtering: rename filters to their antonyms
Kevin Bullock <kbullock@ringworld.org>
parents:
18357
diff
changeset
|
163 |
=== .hg/cache/branchheads-served === |
14162
301725c3df9a
localrepo: reuse parent manifest in commitctx if no files have changed
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
13550
diff
changeset
|
164 |
adf1a74a7f7b4cd193d12992f5d0d6a004ed21d6 4 |
18357
a4ab37ca887b
localrepo: store branchheads sorted
Mads Kiilerich <mads@kiilerich.com>
parents:
18267
diff
changeset
|
165 |
c21617b13b220988e7a2e26290fbe4325ffa7139 bar |
14162
301725c3df9a
localrepo: reuse parent manifest in commitctx if no files have changed
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
13550
diff
changeset
|
166 |
1c28f494dae69a2f8fc815059d257eccf3fcfe75 default |
301725c3df9a
localrepo: reuse parent manifest in commitctx if no files have changed
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
13550
diff
changeset
|
167 |
adf1a74a7f7b4cd193d12992f5d0d6a004ed21d6 foo |
12279 | 168 |
|
169 |
Push should update the branch cache: |
|
170 |
||
171 |
$ hg init ../target |
|
172 |
||
173 |
Pushing just rev 0: |
|
174 |
||
175 |
$ hg push -qr 0 ../target |
|
5988
ee317dbfb9d0
update the branch cache at the end of addchangegroup
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4410
diff
changeset
|
176 |
|
18234
a55b06885cda
branchmap: allow to use cache of subset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
18166
diff
changeset
|
177 |
$ (cd ../target/; listbranchcaches) |
18382
f3b21beb9802
filtering: rename filters to their antonyms
Kevin Bullock <kbullock@ringworld.org>
parents:
18357
diff
changeset
|
178 |
=== .hg/cache/branchheads-base === |
12279 | 179 |
db01e8ea3388fd3c7c94e1436ea2bd6a53d581c5 0 |
180 |
db01e8ea3388fd3c7c94e1436ea2bd6a53d581c5 default |
|
181 |
||
182 |
Pushing everything: |
|
183 |
||
184 |
$ hg push -qf ../target |
|
185 |
||
18234
a55b06885cda
branchmap: allow to use cache of subset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
18166
diff
changeset
|
186 |
$ (cd ../target/; listbranchcaches) |
18382
f3b21beb9802
filtering: rename filters to their antonyms
Kevin Bullock <kbullock@ringworld.org>
parents:
18357
diff
changeset
|
187 |
=== .hg/cache/branchheads-base === |
14162
301725c3df9a
localrepo: reuse parent manifest in commitctx if no files have changed
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
13550
diff
changeset
|
188 |
adf1a74a7f7b4cd193d12992f5d0d6a004ed21d6 4 |
18357
a4ab37ca887b
localrepo: store branchheads sorted
Mads Kiilerich <mads@kiilerich.com>
parents:
18267
diff
changeset
|
189 |
c21617b13b220988e7a2e26290fbe4325ffa7139 bar |
14162
301725c3df9a
localrepo: reuse parent manifest in commitctx if no files have changed
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
13550
diff
changeset
|
190 |
1c28f494dae69a2f8fc815059d257eccf3fcfe75 default |
301725c3df9a
localrepo: reuse parent manifest in commitctx if no files have changed
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
13550
diff
changeset
|
191 |
adf1a74a7f7b4cd193d12992f5d0d6a004ed21d6 foo |
12279 | 192 |
|
193 |
Update with no arguments: tipmost revision of the current branch: |
|
194 |
||
195 |
$ hg up -q -C 0 |
|
196 |
$ hg up -q |
|
197 |
$ hg id |
|
14162
301725c3df9a
localrepo: reuse parent manifest in commitctx if no files have changed
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
13550
diff
changeset
|
198 |
1c28f494dae6 |
12279 | 199 |
|
200 |
$ hg up -q 1 |
|
201 |
$ hg up -q |
|
202 |
$ hg id |
|
14162
301725c3df9a
localrepo: reuse parent manifest in commitctx if no files have changed
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
13550
diff
changeset
|
203 |
adf1a74a7f7b (foo) tip |
12279 | 204 |
|
205 |
$ hg branch foobar |
|
206 |
marked working directory as branch foobar |
|
15615 | 207 |
(branches are permanent and global, did you want a bookmark?) |
12279 | 208 |
|
209 |
$ hg up |
|
210 |
abort: branch foobar not found |
|
12316
4134686b83e1
tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents:
12279
diff
changeset
|
211 |
[255] |
12279 | 212 |
|
213 |
Fastforward merge: |
|
214 |
||
215 |
$ hg branch ff |
|
216 |
marked working directory as branch ff |
|
15615 | 217 |
(branches are permanent and global, did you want a bookmark?) |
4231
83153299aab5
avoid a traceback with hg branch newbranch; hg up
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4179
diff
changeset
|
218 |
|
12279 | 219 |
$ echo ff > ff |
220 |
$ hg ci -Am'fast forward' |
|
221 |
adding ff |
|
222 |
||
223 |
$ hg up foo |
|
224 |
0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
225 |
||
226 |
$ hg merge ff |
|
227 |
1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
228 |
(branch merge, don't forget to commit) |
|
4410
bbc97d419b16
Add fast-forward branch merging
Brendan Cully <brendan@kublai.com>
parents:
4232
diff
changeset
|
229 |
|
12279 | 230 |
$ hg branch |
231 |
foo |
|
232 |
$ hg commit -m'Merge ff into foo' |
|
233 |
$ hg parents |
|
14162
301725c3df9a
localrepo: reuse parent manifest in commitctx if no files have changed
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
13550
diff
changeset
|
234 |
changeset: 6:185ffbfefa30 |
12279 | 235 |
branch: foo |
236 |
tag: tip |
|
14162
301725c3df9a
localrepo: reuse parent manifest in commitctx if no files have changed
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
13550
diff
changeset
|
237 |
parent: 4:adf1a74a7f7b |
301725c3df9a
localrepo: reuse parent manifest in commitctx if no files have changed
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
13550
diff
changeset
|
238 |
parent: 5:1a3c27dc5e11 |
12279 | 239 |
user: test |
240 |
date: Thu Jan 01 00:00:00 1970 +0000 |
|
241 |
summary: Merge ff into foo |
|
242 |
||
243 |
$ hg manifest |
|
244 |
a |
|
245 |
ff |
|
246 |
||
247 |
||
248 |
Test merging, add 3 default heads and one test head: |
|
249 |
||
250 |
$ cd .. |
|
251 |
$ hg init merges |
|
252 |
$ cd merges |
|
253 |
$ echo a > a |
|
254 |
$ hg ci -Ama |
|
255 |
adding a |
|
256 |
||
257 |
$ echo b > b |
|
258 |
$ hg ci -Amb |
|
259 |
adding b |
|
6723
1fe6f365df2e
merge: only in-branch merges can be implicit
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
6160
diff
changeset
|
260 |
|
12279 | 261 |
$ hg up 0 |
262 |
0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
263 |
$ echo c > c |
|
264 |
$ hg ci -Amc |
|
265 |
adding c |
|
266 |
created new head |
|
6723
1fe6f365df2e
merge: only in-branch merges can be implicit
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
6160
diff
changeset
|
267 |
|
12279 | 268 |
$ hg up 0 |
269 |
0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
270 |
$ echo d > d |
|
271 |
$ hg ci -Amd |
|
272 |
adding d |
|
273 |
created new head |
|
6723
1fe6f365df2e
merge: only in-branch merges can be implicit
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
6160
diff
changeset
|
274 |
|
12279 | 275 |
$ hg up 0 |
276 |
0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
277 |
$ hg branch test |
|
278 |
marked working directory as branch test |
|
15615 | 279 |
(branches are permanent and global, did you want a bookmark?) |
12279 | 280 |
$ echo e >> e |
281 |
$ hg ci -Ame |
|
282 |
adding e |
|
6723
1fe6f365df2e
merge: only in-branch merges can be implicit
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
6160
diff
changeset
|
283 |
|
12279 | 284 |
$ hg log |
285 |
changeset: 4:3a1e01ed1df4 |
|
286 |
branch: test |
|
287 |
tag: tip |
|
288 |
parent: 0:cb9a9f314b8b |
|
289 |
user: test |
|
290 |
date: Thu Jan 01 00:00:00 1970 +0000 |
|
291 |
summary: e |
|
292 |
||
293 |
changeset: 3:980f7dc84c29 |
|
294 |
parent: 0:cb9a9f314b8b |
|
295 |
user: test |
|
296 |
date: Thu Jan 01 00:00:00 1970 +0000 |
|
297 |
summary: d |
|
298 |
||
299 |
changeset: 2:d36c0562f908 |
|
300 |
parent: 0:cb9a9f314b8b |
|
301 |
user: test |
|
302 |
date: Thu Jan 01 00:00:00 1970 +0000 |
|
303 |
summary: c |
|
304 |
||
305 |
changeset: 1:d2ae7f538514 |
|
306 |
user: test |
|
307 |
date: Thu Jan 01 00:00:00 1970 +0000 |
|
308 |
summary: b |
|
309 |
||
310 |
changeset: 0:cb9a9f314b8b |
|
311 |
user: test |
|
312 |
date: Thu Jan 01 00:00:00 1970 +0000 |
|
313 |
summary: a |
|
314 |
||
315 |
Implicit merge with test branch as parent: |
|
6723
1fe6f365df2e
merge: only in-branch merges can be implicit
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
6160
diff
changeset
|
316 |
|
12279 | 317 |
$ hg merge |
318 |
abort: branch 'test' has one head - please merge with an explicit rev |
|
319 |
(run 'hg heads' to see all heads) |
|
12316
4134686b83e1
tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents:
12279
diff
changeset
|
320 |
[255] |
12279 | 321 |
$ hg up -C default |
322 |
1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
323 |
||
324 |
Implicit merge with default branch as parent: |
|
325 |
||
326 |
$ hg merge |
|
327 |
abort: branch 'default' has 3 heads - please merge with an explicit rev |
|
328 |
(run 'hg heads .' to see heads) |
|
12316
4134686b83e1
tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents:
12279
diff
changeset
|
329 |
[255] |
12279 | 330 |
|
331 |
3 branch heads, explicit merge required: |
|
332 |
||
333 |
$ hg merge 2 |
|
334 |
1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
335 |
(branch merge, don't forget to commit) |
|
336 |
$ hg ci -m merge |
|
337 |
||
338 |
2 branch heads, implicit merge works: |
|
339 |
||
340 |
$ hg merge |
|
341 |
1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
342 |
(branch merge, don't forget to commit) |
|
343 |
||
16913
f2719b387380
tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents:
15907
diff
changeset
|
344 |
$ cd .. |