##// END OF EJS Templates
revert: be more helpful on uncommitted merges...
Adrian Buehlmann -
r14721:4fcde634 stable
parent child Browse files
Show More
@@ -4181,8 +4181,12 b' def revert(ui, repo, *pats, **opts):'
4181 4181 parent, p2 = repo.dirstate.parents()
4182 4182
4183 4183 if not pats and not opts.get('all'):
4184 raise util.Abort(_('no files or directories specified'),
4185 hint=_('use --all to discard all changes'))
4184 msg = _("no files or directories specified")
4185 hint = _("use --all to discard all changes")
4186 if p2 != nullid:
4187 hint = _("uncommitted merge, use --all to discard all changes,"
4188 " or 'hg update -C .' to abort the merge")
4189 raise util.Abort(msg, hint=hint)
4186 4190
4187 4191 ctx = scmutil.revsingle(repo, opts.get('rev'))
4188 4192 node = ctx.node()
@@ -60,7 +60,7 b' Revert should fail:'
60 60
61 61 $ hg revert
62 62 abort: no files or directories specified
63 (use --all to discard all changes)
63 (uncommitted merge, use --all to discard all changes, or 'hg update -C .' to abort the merge)
64 64 [255]
65 65
66 66 Revert should be ok now:
General Comments 0
You need to be logged in to leave comments. Login now