Show More
@@ -730,30 +730,29 b' def commit(ui, repo, *pats, **opts):' | |||
|
730 | 730 | return repo.commit(message, opts.get('user'), opts.get('date'), match, |
|
731 | 731 | editor=e, extra=extra) |
|
732 | 732 | |
|
733 | branch = repo[None].branch() | |
|
734 | bheads = repo.branchheads(branch) | |
|
735 | ||
|
733 | 736 | node = cmdutil.commit(ui, repo, commitfunc, pats, opts) |
|
734 | 737 | if not node: |
|
735 | 738 | ui.status(_("nothing changed\n")) |
|
736 | 739 | return |
|
737 | cl = repo.changelog | |
|
738 |
|
|
|
739 |
parents = c |
|
|
740 | if rev - 1 in parents: | |
|
741 | # one of the parents was the old tip | |
|
742 | pass | |
|
743 | elif (parents == (nullrev, nullrev) or | |
|
744 | len(cl.heads(cl.node(parents[0]))) > 1 and | |
|
745 | (parents[1] == nullrev or len(cl.heads(cl.node(parents[1]))) > 1)): | |
|
740 | ||
|
741 | ctx = repo[node] | |
|
742 | parents = ctx.parents() | |
|
743 | ||
|
744 | if bheads and [x for x in parents if x.node() not in bheads]: | |
|
746 | 745 | ui.status(_('created new head\n')) |
|
747 | 746 | |
|
748 | 747 | if not opts.get('close_branch'): |
|
749 | 748 | for r in parents: |
|
750 |
if |
|
|
749 | if r.extra().get('close'): | |
|
751 | 750 | ui.status(_('reopening closed branch head %d\n') % r) |
|
752 | 751 | |
|
753 | 752 | if ui.debugflag: |
|
754 |
ui.write(_('committed changeset %d:%s\n') % ( |
|
|
753 | ui.write(_('committed changeset %d:%s\n') % (int(ctx), ctx.hex())) | |
|
755 | 754 | elif ui.verbose: |
|
756 |
ui.write(_('committed changeset %d:%s\n') % ( |
|
|
755 | ui.write(_('committed changeset %d:%s\n') % (int(ctx), ctx)) | |
|
757 | 756 | |
|
758 | 757 | def copy(ui, repo, *pats, **opts): |
|
759 | 758 | """mark files as copied for the next commit |
@@ -10,7 +10,6 b' 1: Adding a branch (a)' | |||
|
10 | 10 | ======= |
|
11 | 11 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
12 | 12 | marked working directory as branch b |
|
13 | created new head | |
|
14 | 13 | 2: Adding b branch (b) |
|
15 | 14 | 1: Adding a branch (a) |
|
16 | 15 | 0: Adding root node () |
@@ -2,7 +2,6 b' marked working directory as branch a' | |||
|
2 | 2 | adding foo |
|
3 | 3 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
4 | 4 | marked working directory as branch c |
|
5 | created new head | |
|
6 | 5 | requesting all changes |
|
7 | 6 | adding changesets |
|
8 | 7 | adding manifests |
@@ -3,7 +3,6 b' marked working directory as branch q' | |||
|
3 | 3 | reset working directory to branch a |
|
4 | 4 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
5 | 5 | marked working directory as branch b |
|
6 | created new head | |
|
7 | 6 | 1 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
8 | 7 | marked working directory as branch c |
|
9 | 8 | abort: the name 'tip' is reserved |
@@ -4,11 +4,9 b' adding bar' | |||
|
4 | 4 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
5 | 5 | marked working directory as branch mine |
|
6 | 6 | adding world |
|
7 | created new head | |
|
8 | 7 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
9 | 8 | marked working directory as branch other |
|
10 | 9 | adding bye |
|
11 | created new head | |
|
12 | 10 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
13 | 11 | % test -U -u |
|
14 | 12 | abort: cannot specify both --noupdate and --updaterev |
@@ -66,7 +66,6 b' 1 files updated, 0 files merged, 1 files' | |||
|
66 | 66 | |
|
67 | 67 | % add branch 'stable' to repo a for later tests |
|
68 | 68 | marked working directory as branch stable |
|
69 | created new head | |
|
70 | 69 | % tag ref2 |
|
71 | 70 | |
|
72 | 71 | % updating back to ref2 |
@@ -3,7 +3,6 b' marked working directory as branch branc' | |||
|
3 | 3 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
4 | 4 | marked working directory as branch branchb |
|
5 | 5 | adding b |
|
6 | created new head | |
|
7 | 6 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
8 | 7 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
9 | 8 | % convert with datesort |
@@ -86,7 +86,6 b' marked working directory as branch a' | |||
|
86 | 86 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
87 | 87 | marked working directory as branch b |
|
88 | 88 | adding b |
|
89 | created new head | |
|
90 | 89 | |
|
91 | 90 | % pull in change on foreign branch |
|
92 | 91 | updating to branch default |
@@ -156,8 +155,8 b' 1 files updated, 0 files merged, 0 files' | |||
|
156 | 155 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
157 | 156 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
158 | 157 | (branch merge, don't forget to commit) |
|
158 | created new head | |
|
159 | 159 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
160 | created new head | |
|
161 | 160 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
162 | 161 | created new head |
|
163 | 162 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
@@ -184,6 +183,7 b' marked working directory as branch secon' | |||
|
184 | 183 | adding b |
|
185 | 184 | marked working directory as branch default |
|
186 | 185 | adding c |
|
186 | created new head | |
|
187 | 187 | updating to branch default |
|
188 | 188 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
189 | 189 | % fetch should succeed |
@@ -5,6 +5,7 b' 0 files updated, 0 files merged, 1 files' | |||
|
5 | 5 | fast-forward |
|
6 | 6 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
7 | 7 | (branch merge, don't forget to commit) |
|
8 | created new head | |
|
8 | 9 | bogus fast-forward should fail |
|
9 | 10 | abort: can't merge with ancestor |
|
10 | 11 | done |
@@ -462,7 +462,6 b' bar' | |||
|
462 | 462 | % test restricted mode with transplant -b |
|
463 | 463 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
464 | 464 | marked working directory as branch foo |
|
465 | created new head | |
|
466 | 465 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
467 | 466 | applying 4aa30d025d50 |
|
468 | 467 | 4aa30d025d50 transplanted to 5a4da427c162 |
@@ -339,7 +339,6 b' marked working directory as branch test' | |||
|
339 | 339 | adding b |
|
340 | 340 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
341 | 341 | adding c |
|
342 | created new head | |
|
343 | 342 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
344 | 343 | adding c |
|
345 | 344 | % log -b default |
@@ -30,7 +30,6 b' 1 files updated, 0 files merged, 0 files' | |||
|
30 | 30 | abort: there is nothing to merge - use "hg update" instead |
|
31 | 31 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
32 | 32 | marked working directory as branch foobranch |
|
33 | created new head | |
|
34 | 33 | % should fail because merge with other branch |
|
35 | 34 | abort: branch 'foobranch' has one head - please merge with an explicit rev |
|
36 | 35 | (run 'hg heads' to see all heads) |
@@ -19,9 +19,9 b' adding a' | |||
|
19 | 19 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
20 | 20 | marked working directory as branch b |
|
21 | 21 | adding c |
|
22 | created new head | |
|
23 | 22 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
24 | 23 | (branch merge, don't forget to commit) |
|
24 | created new head | |
|
25 | 25 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
26 | 26 | changeset: 2:65309210bf4e |
|
27 | 27 | branch: b |
@@ -4,6 +4,7 b' marked working directory as branch bar' | |||
|
4 | 4 | % branch shadowing |
|
5 | 5 | abort: a branch of the same name already exists (use 'hg update' to switch to it) |
|
6 | 6 | marked working directory as branch default |
|
7 | created new head | |
|
7 | 8 | % there should be only one default branch head |
|
8 | 9 | changeset: 3:bf1bc2f45e83 |
|
9 | 10 | tag: tip |
@@ -13,10 +14,10 b' summary: clear branch name' | |||
|
13 | 14 | |
|
14 | 15 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
15 | 16 | foo |
|
16 | created new head | |
|
17 | 17 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
18 | 18 | (branch merge, don't forget to commit) |
|
19 | 19 | foo |
|
20 | created new head | |
|
20 | 21 | changeset: 5:5f8fb06e083e |
|
21 | 22 | branch: foo |
|
22 | 23 | tag: tip |
@@ -112,6 +113,7 b' 0 files updated, 0 files merged, 1 files' | |||
|
112 | 113 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
113 | 114 | (branch merge, don't forget to commit) |
|
114 | 115 | foo |
|
116 | created new head | |
|
115 | 117 | changeset: 6:f0c74f92a385 |
|
116 | 118 | branch: foo |
|
117 | 119 | tag: tip |
@@ -135,7 +137,6 b' created new head' | |||
|
135 | 137 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
136 | 138 | marked working directory as branch test |
|
137 | 139 | adding e |
|
138 | created new head | |
|
139 | 140 | changeset: 4:3a1e01ed1df4 |
|
140 | 141 | branch: test |
|
141 | 142 | tag: tip |
@@ -1644,7 +1644,6 b' diff -r 000000000000 -r 8580ff50825a a' | |||
|
1644 | 1644 | % test outgoing |
|
1645 | 1645 | 0 files updated, 0 files merged, 6 files removed, 0 files unresolved |
|
1646 | 1646 | marked working directory as branch test |
|
1647 | created new head | |
|
1648 | 1647 | comparing with ../t |
|
1649 | 1648 | searching for changes |
|
1650 | 1649 | This patch series consists of 8 patches. |
@@ -11,7 +11,6 b' 1 files updated, 0 files merged, 0 files' | |||
|
11 | 11 | % create branch B |
|
12 | 12 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
13 | 13 | marked working directory as branch branchB |
|
14 | created new head | |
|
15 | 14 | % a new branch is there |
|
16 | 15 | pulling from ../t |
|
17 | 16 | searching for changes |
@@ -169,6 +169,7 b' marked working directory as branch b' | |||
|
169 | 169 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
170 | 170 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
171 | 171 | (branch merge, don't forget to commit) |
|
172 | created new head | |
|
172 | 173 | pushing to j |
|
173 | 174 | searching for changes |
|
174 | 175 | abort: push creates new remote branches: b! |
@@ -190,7 +191,6 b' 0 files updated, 0 files merged, 0 files' | |||
|
190 | 191 | adding b1 |
|
191 | 192 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
192 | 193 | adding a2 |
|
193 | created new head | |
|
194 | 194 | %% glog of local |
|
195 | 195 | @ 2: A a2 |
|
196 | 196 | | |
@@ -222,7 +222,6 b' marked working directory as branch B' | |||
|
222 | 222 | adding b |
|
223 | 223 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
224 | 224 | adding a1 |
|
225 | created new head | |
|
226 | 225 | updating to branch A |
|
227 | 226 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
228 | 227 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
@@ -263,13 +262,14 b' adding a' | |||
|
263 | 262 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
264 | 263 | marked working directory as branch B |
|
265 | 264 | adding b |
|
266 | created new head | |
|
267 | 265 | updating to branch B |
|
268 | 266 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
269 | 267 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
270 | 268 | marked working directory as branch B |
|
269 | created new head | |
|
271 | 270 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
272 | 271 | marked working directory as branch A |
|
272 | created new head | |
|
273 | 273 | %% glog of local |
|
274 | 274 | @ 5: A b3 |
|
275 | 275 | | |
@@ -1,6 +1,5 b'' | |||
|
1 | 1 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
2 | 2 | marked working directory as branch notdefault |
|
3 | created new head | |
|
4 | 3 | @ 4:r1:notdefault |
|
5 | 4 | | |
|
6 | 5 | | o 3:l2: |
@@ -90,6 +90,7 b' path t' | |||
|
90 | 90 | source t |
|
91 | 91 | revision 6747d179aa9a688023c4b0cad32e4c92bb7f34ad |
|
92 | 92 | committing subrepository t |
|
93 | created new head | |
|
93 | 94 | searching for copies back to rev 2 |
|
94 | 95 | resolving manifests |
|
95 | 96 | overwrite None partial False |
@@ -222,16 +223,16 b' adding a' | |||
|
222 | 223 | marked working directory as branch br |
|
223 | 224 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
224 | 225 | adding b |
|
225 | created new head | |
|
226 | 226 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
227 | 227 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
228 | 228 | (branch merge, don't forget to commit) |
|
229 | created new head | |
|
229 | 230 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
230 | 231 | adding c |
|
231 | created new head | |
|
232 | 232 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
233 | 233 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
234 | 234 | (branch merge, don't forget to commit) |
|
235 | created new head | |
|
235 | 236 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
236 | 237 | adding .hgsub |
|
237 | 238 | committing subrepository s |
@@ -241,15 +242,14 b' adding b' | |||
|
241 | 242 | committing subrepository s |
|
242 | 243 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
243 | 244 | adding c |
|
244 | created new head | |
|
245 | 245 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
246 | 246 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
247 | 247 | (branch merge, don't forget to commit) |
|
248 | created new head | |
|
248 | 249 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
249 | 250 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
250 | 251 | adding d |
|
251 | 252 | committing subrepository s |
|
252 | created new head | |
|
253 | 253 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
254 | 254 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
255 | 255 | adding e |
General Comments 0
You need to be logged in to leave comments.
Login now