Show More
@@ -132,7 +132,7 b' def rebase(ui, repo, **opts):' | |||||
132 | if basef: |
|
132 | if basef: | |
133 | raise util.Abort(_('cannot specify a base with detach')) |
|
133 | raise util.Abort(_('cannot specify a base with detach')) | |
134 |
|
134 | |||
135 |
cmdutil.bail |
|
135 | cmdutil.bailifchanged(repo) | |
136 | result = buildstate(repo, destf, srcf, basef, detachf) |
|
136 | result = buildstate(repo, destf, srcf, basef, detachf) | |
137 | if not result: |
|
137 | if not result: | |
138 | # Empty state built, nothing to rebase |
|
138 | # Empty state built, nothing to rebase | |
@@ -531,7 +531,7 b' def pullrebase(orig, ui, repo, *args, **' | |||||
531 | ui.debug('--update and --rebase are not compatible, ignoring ' |
|
531 | ui.debug('--update and --rebase are not compatible, ignoring ' | |
532 | 'the update flag\n') |
|
532 | 'the update flag\n') | |
533 |
|
533 | |||
534 |
cmdutil.bail |
|
534 | cmdutil.bailifchanged(repo) | |
535 | revsprepull = len(repo) |
|
535 | revsprepull = len(repo) | |
536 | origpostincoming = commands.postincoming |
|
536 | origpostincoming = commands.postincoming | |
537 | def _dummy(*args, **kwargs): |
|
537 | def _dummy(*args, **kwargs): |
@@ -78,7 +78,7 b' def findrepo(p):' | |||||
78 |
|
78 | |||
79 | return p |
|
79 | return p | |
80 |
|
80 | |||
81 |
def bail |
|
81 | def bailifchanged(repo): | |
82 | if repo.dirstate.p2() != nullid: |
|
82 | if repo.dirstate.p2() != nullid: | |
83 | raise util.Abort(_('outstanding uncommitted merge')) |
|
83 | raise util.Abort(_('outstanding uncommitted merge')) | |
84 | modified, added, removed, deleted = repo.status()[:4] |
|
84 | modified, added, removed, deleted = repo.status()[:4] |
@@ -243,7 +243,7 b' def backout(ui, repo, node=None, rev=Non' | |||||
243 | if date: |
|
243 | if date: | |
244 | opts['date'] = util.parsedate(date) |
|
244 | opts['date'] = util.parsedate(date) | |
245 |
|
245 | |||
246 |
cmdutil.bail |
|
246 | cmdutil.bailifchanged(repo) | |
247 | node = cmdutil.revsingle(repo, rev).node() |
|
247 | node = cmdutil.revsingle(repo, rev).node() | |
248 |
|
248 | |||
249 | op1, op2 = repo.dirstate.parents() |
|
249 | op1, op2 = repo.dirstate.parents() | |
@@ -426,7 +426,7 b' def bisect(ui, repo, rev=None, extra=Non' | |||||
426 | # bisect |
|
426 | # bisect | |
427 | nodes, changesets, good = hbisect.bisect(repo.changelog, state) |
|
427 | nodes, changesets, good = hbisect.bisect(repo.changelog, state) | |
428 | # update to next check |
|
428 | # update to next check | |
429 |
cmdutil.bail |
|
429 | cmdutil.bailifchanged(repo) | |
430 | hg.clean(repo, nodes[0], show_stats=False) |
|
430 | hg.clean(repo, nodes[0], show_stats=False) | |
431 | finally: |
|
431 | finally: | |
432 | hbisect.save_state(repo, state) |
|
432 | hbisect.save_state(repo, state) | |
@@ -462,7 +462,7 b' def bisect(ui, repo, rev=None, extra=Non' | |||||
462 | % (extendnode.rev(), extendnode))) |
|
462 | % (extendnode.rev(), extendnode))) | |
463 | if noupdate: |
|
463 | if noupdate: | |
464 | return |
|
464 | return | |
465 |
cmdutil.bail |
|
465 | cmdutil.bailifchanged(repo) | |
466 | return hg.clean(repo, extendnode.node()) |
|
466 | return hg.clean(repo, extendnode.node()) | |
467 | raise util.Abort(_("nothing to extend")) |
|
467 | raise util.Abort(_("nothing to extend")) | |
468 |
|
468 | |||
@@ -480,7 +480,7 b' def bisect(ui, repo, rev=None, extra=Non' | |||||
480 | "(%d changesets remaining, ~%d tests)\n") |
|
480 | "(%d changesets remaining, ~%d tests)\n") | |
481 | % (rev, short(node), changesets, tests)) |
|
481 | % (rev, short(node), changesets, tests)) | |
482 | if not noupdate: |
|
482 | if not noupdate: | |
483 |
cmdutil.bail |
|
483 | cmdutil.bailifchanged(repo) | |
484 | return hg.clean(repo, node) |
|
484 | return hg.clean(repo, node) | |
485 |
|
485 | |||
486 | def bookmark(ui, repo, mark=None, rev=None, force=False, delete=False, |
|
486 | def bookmark(ui, repo, mark=None, rev=None, force=False, delete=False, | |
@@ -2606,7 +2606,7 b' def import_(ui, repo, patch1, *patches, ' | |||||
2606 | raise util.Abort(_('similarity must be between 0 and 100')) |
|
2606 | raise util.Abort(_('similarity must be between 0 and 100')) | |
2607 |
|
2607 | |||
2608 | if opts.get('exact') or not opts.get('force'): |
|
2608 | if opts.get('exact') or not opts.get('force'): | |
2609 |
cmdutil.bail |
|
2609 | cmdutil.bailifchanged(repo) | |
2610 |
|
2610 | |||
2611 | d = opts["base"] |
|
2611 | d = opts["base"] | |
2612 | strip = opts["strip"] |
|
2612 | strip = opts["strip"] |
General Comments 0
You need to be logged in to leave comments.
Login now