equal
deleted
inserted
replaced
4179 opts["rev"] = cmdutil.finddate(ui, repo, opts["date"]) |
4179 opts["rev"] = cmdutil.finddate(ui, repo, opts["date"]) |
4180 |
4180 |
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 raise util.Abort(_('no files or directories specified'), |
4184 msg = _("no files or directories specified") |
4185 hint=_('use --all to discard all changes')) |
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() |
4189 mf = ctx.manifest() |
4193 mf = ctx.manifest() |
4190 if node == parent: |
4194 if node == parent: |