Show More
@@ -4181,8 +4181,12 b' def revert(ui, repo, *pats, **opts):' | |||||
4181 | parent, p2 = repo.dirstate.parents() |
|
4181 | parent, p2 = repo.dirstate.parents() | |
4182 |
|
4182 | |||
4183 | if not pats and not opts.get('all'): |
|
4183 | if not pats and not opts.get('all'): | |
4184 |
|
|
4184 | msg = _("no files or directories specified") | |
4185 |
|
|
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 | ctx = scmutil.revsingle(repo, opts.get('rev')) |
|
4191 | ctx = scmutil.revsingle(repo, opts.get('rev')) | |
4188 | node = ctx.node() |
|
4192 | node = ctx.node() |
@@ -60,7 +60,7 b' Revert should fail:' | |||||
60 |
|
60 | |||
61 | $ hg revert |
|
61 | $ hg revert | |
62 | abort: no files or directories specified |
|
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 | [255] |
|
64 | [255] | |
65 |
|
65 | |||
66 | Revert should be ok now: |
|
66 | Revert should be ok now: |
General Comments 0
You need to be logged in to leave comments.
Login now