Show More
@@ -2561,19 +2561,20 b' def merge(ui, repo, node=None, **opts):' | |||
|
2561 | 2561 | branch = repo.changectx(None).branch() |
|
2562 | 2562 | bheads = repo.branchheads(branch) |
|
2563 | 2563 | if len(bheads) > 2: |
|
2564 | ui.warn(_("abort: branch '%s' has %d heads - " | |
|
2565 | "please merge with an explicit rev\n") | |
|
2566 | % (branch, len(bheads))) | |
|
2567 |
|
|
|
2568 | return False | |
|
2564 | raise util.Abort(_( | |
|
2565 | 'branch \'%s\' has %d heads - ' | |
|
2566 | 'please merge with an explicit rev\n' | |
|
2567 | '(run \'hg heads .\' to see heads)') | |
|
2568 | % (branch, len(bheads))) | |
|
2569 | 2569 | |
|
2570 | 2570 | parent = repo.dirstate.parents()[0] |
|
2571 | 2571 | if len(bheads) == 1: |
|
2572 | 2572 | if len(repo.heads()) > 1: |
|
2573 | ui.warn(_("abort: branch '%s' has one head - " | |
|
2574 | "please merge with an explicit rev\n" % branch)) | |
|
2575 | ui.status(_("(run 'hg heads' to see all heads)\n")) | |
|
2576 | return False | |
|
2573 | raise util.Abort(_( | |
|
2574 | 'branch \'%s\' has one head - ' | |
|
2575 | 'please merge with an explicit rev\n' | |
|
2576 | '(run \'hg heads\' to see all heads)') | |
|
2577 | % branch) | |
|
2577 | 2578 | msg = _('there is nothing to merge') |
|
2578 | 2579 | if parent != repo.lookup(repo[None].branch()): |
|
2579 | 2580 | msg = _('%s - use "hg update" instead') % msg |
General Comments 0
You need to be logged in to leave comments.
Login now