Show More
@@ -4093,11 +4093,9 b' def revert(ui, repo, *pats, **opts):' | |||
|
4093 | 4093 | To cancel a merge (and lose your changes), use :hg:`update --clean .`. |
|
4094 | 4094 | |
|
4095 | 4095 | With no revision specified, revert the named files or directories |
|
4096 | to the contents they had in the parent of the working directory. | |
|
4096 | to the contents they had in the first parent of the working directory. | |
|
4097 | 4097 | This restores the contents of the affected files to an unmodified |
|
4098 |
state and unschedules adds, removes, copies, and renames. |
|
|
4099 | working directory has two parents, you must explicitly specify a | |
|
4100 | revision. | |
|
4098 | state and unschedules adds, removes, copies, and renames. | |
|
4101 | 4099 | |
|
4102 | 4100 | Using the -r/--rev option, revert the given files or directories |
|
4103 | 4101 | to their contents as of a specific revision. This can be helpful |
@@ -4129,13 +4127,10 b' def revert(ui, repo, *pats, **opts):' | |||
|
4129 | 4127 | opts["rev"] = cmdutil.finddate(ui, repo, opts["date"]) |
|
4130 | 4128 | |
|
4131 | 4129 | parent, p2 = repo.dirstate.parents() |
|
4132 | if not opts.get('rev') and p2 != nullid: | |
|
4133 | raise util.Abort(_('uncommitted merge - ' | |
|
4134 | 'use "hg update", see "hg help revert"')) | |
|
4135 | 4130 | |
|
4136 | 4131 | if not pats and not opts.get('all'): |
|
4137 |
raise util.Abort(_('no files or directories specified |
|
|
4138 |
|
|
|
4132 | raise util.Abort(_('no files or directories specified'), | |
|
4133 | hint=_('use --all to revert all files')) | |
|
4139 | 4134 | |
|
4140 | 4135 | ctx = scmutil.revsingle(repo, opts.get('rev')) |
|
4141 | 4136 | node = ctx.node() |
@@ -59,7 +59,8 b' Should show a removed and b added:' | |||
|
59 | 59 | Revert should fail: |
|
60 | 60 | |
|
61 | 61 | $ hg revert |
|
62 | abort: uncommitted merge - use "hg update", see "hg help revert" | |
|
62 | abort: no files or directories specified | |
|
63 | (use --all to revert all files) | |
|
63 | 64 | [255] |
|
64 | 65 | |
|
65 | 66 | Revert should be ok now: |
@@ -185,7 +185,8 b' Issue241: update and revert produces inc' | |||
|
185 | 185 | should fail - no arguments |
|
186 | 186 | |
|
187 | 187 | $ hg revert -rtip |
|
188 |
abort: no files or directories specified |
|
|
188 | abort: no files or directories specified | |
|
189 | (use --all to revert all files) | |
|
189 | 190 | [255] |
|
190 | 191 | |
|
191 | 192 | should succeed |
General Comments 0
You need to be logged in to leave comments.
Login now