Show More
@@ -4042,10 +4042,10 b' def merge(ui, repo, node=None, **opts):' | |||||
4042 | "please merge with an explicit rev") |
|
4042 | "please merge with an explicit rev") | |
4043 | % branch, |
|
4043 | % branch, | |
4044 | hint=_("run 'hg heads' to see all heads")) |
|
4044 | hint=_("run 'hg heads' to see all heads")) | |
4045 |
msg = _(' |
|
4045 | msg, hint = _('nothing to merge'), None | |
4046 | if parent != repo.lookup(branch): |
|
4046 | if parent != repo.lookup(branch): | |
4047 |
|
|
4047 | hint = _("use 'hg update' instead") | |
4048 | raise util.Abort(msg) |
|
4048 | raise util.Abort(msg, hint=hint) | |
4049 |
|
4049 | |||
4050 | if parent not in bheads: |
|
4050 | if parent not in bheads: | |
4051 | raise util.Abort(_('working directory not at a head revision'), |
|
4051 | raise util.Abort(_('working directory not at a head revision'), |
@@ -519,11 +519,12 b' def update(repo, node, branchmerge, forc' | |||||
519 | " has no effect")) |
|
519 | " has no effect")) | |
520 | elif pa == p1: |
|
520 | elif pa == p1: | |
521 | if p1.branch() == p2.branch(): |
|
521 | if p1.branch() == p2.branch(): | |
522 |
raise util.Abort(_("nothing to merge |
|
522 | raise util.Abort(_("nothing to merge"), | |
523 |
|
|
523 | hint=_("use 'hg update' " | |
|
524 | "or check 'hg heads'")) | |||
524 | if not force and (wc.files() or wc.deleted()): |
|
525 | if not force and (wc.files() or wc.deleted()): | |
525 |
raise util.Abort(_("outstanding uncommitted changes |
|
526 | raise util.Abort(_("outstanding uncommitted changes"), | |
526 |
|
|
527 | hint=_("use 'hg status' to list changes")) | |
527 | for s in wc.substate: |
|
528 | for s in wc.substate: | |
528 | if wc.sub(s).dirty(): |
|
529 | if wc.sub(s).dirty(): | |
529 | raise util.Abort(_("outstanding uncommitted changes in " |
|
530 | raise util.Abort(_("outstanding uncommitted changes in " |
@@ -66,7 +66,7 b' Should succeed - 2 heads:' | |||||
66 | Should fail because at tip: |
|
66 | Should fail because at tip: | |
67 |
|
67 | |||
68 | $ hg merge |
|
68 | $ hg merge | |
69 |
abort: |
|
69 | abort: nothing to merge | |
70 | [255] |
|
70 | [255] | |
71 |
|
71 | |||
72 | $ hg up 0 |
|
72 | $ hg up 0 | |
@@ -75,7 +75,8 b' Should fail because at tip:' | |||||
75 | Should fail because there is only one head: |
|
75 | Should fail because there is only one head: | |
76 |
|
76 | |||
77 | $ hg merge |
|
77 | $ hg merge | |
78 | abort: there is nothing to merge - use "hg update" instead |
|
78 | abort: nothing to merge | |
|
79 | (use 'hg update' instead) | |||
79 | [255] |
|
80 | [255] | |
80 |
|
81 | |||
81 | $ hg up 3 |
|
82 | $ hg up 3 |
@@ -19,7 +19,8 b' Local deleted a file, remote removed' | |||||
19 | Should fail, since there are deleted files: |
|
19 | Should fail, since there are deleted files: | |
20 |
|
20 | |||
21 | $ hg merge |
|
21 | $ hg merge | |
22 |
abort: outstanding uncommitted changes |
|
22 | abort: outstanding uncommitted changes | |
|
23 | (use 'hg status' to list changes) | |||
23 | [255] |
|
24 | [255] | |
24 |
|
25 | |||
25 | Should succeed with --force: |
|
26 | Should succeed with --force: |
@@ -108,7 +108,8 b' Contents of b should be "this is file b1' | |||||
108 | $ echo This is file b22 > b |
|
108 | $ echo This is file b22 > b | |
109 | merge fails |
|
109 | merge fails | |
110 | $ hg merge 2 |
|
110 | $ hg merge 2 | |
111 |
abort: outstanding uncommitted changes |
|
111 | abort: outstanding uncommitted changes | |
|
112 | (use 'hg status' to list changes) | |||
112 | [255] |
|
113 | [255] | |
113 | merge expected! |
|
114 | merge expected! | |
114 | $ hg merge -f 2 |
|
115 | $ hg merge -f 2 | |
@@ -144,7 +145,8 b' merge expected!' | |||||
144 | $ echo This is file b33 > b |
|
145 | $ echo This is file b33 > b | |
145 | merge of b should fail |
|
146 | merge of b should fail | |
146 | $ hg merge 2 |
|
147 | $ hg merge 2 | |
147 |
abort: outstanding uncommitted changes |
|
148 | abort: outstanding uncommitted changes | |
|
149 | (use 'hg status' to list changes) | |||
148 | [255] |
|
150 | [255] | |
149 | merge of b expected |
|
151 | merge of b expected | |
150 | $ hg merge -f 2 |
|
152 | $ hg merge -f 2 |
@@ -84,7 +84,8 b'' | |||||
84 | summary: 1 |
|
84 | summary: 1 | |
85 |
|
85 | |||
86 | $ hg --debug merge |
|
86 | $ hg --debug merge | |
87 | abort: there is nothing to merge - use "hg update" instead |
|
87 | abort: nothing to merge | |
|
88 | (use 'hg update' instead) | |||
88 | [255] |
|
89 | [255] | |
89 | $ hg parents |
|
90 | $ hg parents | |
90 | changeset: 0:c19d34741b0a |
|
91 | changeset: 0:c19d34741b0a | |
@@ -169,7 +170,8 b' create a second head' | |||||
169 | abort: crosses branches (merge branches or use --clean to discard changes) |
|
170 | abort: crosses branches (merge branches or use --clean to discard changes) | |
170 | [255] |
|
171 | [255] | |
171 | $ hg --debug merge |
|
172 | $ hg --debug merge | |
172 |
abort: outstanding uncommitted changes |
|
173 | abort: outstanding uncommitted changes | |
|
174 | (use 'hg status' to list changes) | |||
173 | [255] |
|
175 | [255] | |
174 | $ hg --debug merge -f |
|
176 | $ hg --debug merge -f | |
175 | searching for copies back to rev 1 |
|
177 | searching for copies back to rev 1 |
General Comments 0
You need to be logged in to leave comments.
Login now