Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/commands.py @ 24841:45bd336e3991 stable
revert: accept just -I/-X without paths or -a/-i (issue4592)
'hg revert -I foo' currently fails with
abort: no files or directories specified
(use --all to revert all files, or 'hg update 1' to update)
It doesn't seem intentional that -I/-X without other paths or
--all/--interactive should fail, and it doesn't seem that harmful to
allow it either, so let's just do that.
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Wed, 22 Apr 2015 16:38:36 -0700 |
parents | 6a6b69d9e539 |
children | 12908cdbab73 |
comparison
equal
deleted
inserted
replaced
24840:a5e3634ba024 | 24841:45bd336e3991 |
---|---|
5509 raise util.Abort(_('uncommitted merge with no revision specified'), | 5509 raise util.Abort(_('uncommitted merge with no revision specified'), |
5510 hint=_('use "hg update" or see "hg help revert"')) | 5510 hint=_('use "hg update" or see "hg help revert"')) |
5511 | 5511 |
5512 ctx = scmutil.revsingle(repo, opts.get('rev')) | 5512 ctx = scmutil.revsingle(repo, opts.get('rev')) |
5513 | 5513 |
5514 if not pats and not (opts.get('all') or opts.get('interactive')): | 5514 if (not (pats or opts.get('include') or opts.get('exclude') or |
5515 opts.get('all') or opts.get('interactive'))): | |
5515 msg = _("no files or directories specified") | 5516 msg = _("no files or directories specified") |
5516 if p2 != nullid: | 5517 if p2 != nullid: |
5517 hint = _("uncommitted merge, use --all to discard all changes," | 5518 hint = _("uncommitted merge, use --all to discard all changes," |
5518 " or 'hg update -C .' to abort the merge") | 5519 " or 'hg update -C .' to abort the merge") |
5519 raise util.Abort(msg, hint=hint) | 5520 raise util.Abort(msg, hint=hint) |