equal
deleted
inserted
replaced
3103 if opts.get("date"): |
3103 if opts.get("date"): |
3104 if opts.get("rev"): |
3104 if opts.get("rev"): |
3105 raise util.Abort(_("you can't specify a revision and a date")) |
3105 raise util.Abort(_("you can't specify a revision and a date")) |
3106 opts["rev"] = cmdutil.finddate(ui, repo, opts["date"]) |
3106 opts["rev"] = cmdutil.finddate(ui, repo, opts["date"]) |
3107 |
3107 |
|
3108 parent, p2 = repo.dirstate.parents() |
|
3109 if not opts.get('rev') and p2 != nullid: |
|
3110 raise util.Abort(_('uncommitted merge - ' |
|
3111 'use "hg update", see "hg help revert"')) |
|
3112 |
3108 if not pats and not opts.get('all'): |
3113 if not pats and not opts.get('all'): |
3109 raise util.Abort(_('no files or directories specified; ' |
3114 raise util.Abort(_('no files or directories specified; ' |
3110 'use --all to revert the whole repo')) |
3115 'use --all to revert the whole repo')) |
3111 |
3116 |
3112 parent, p2 = repo.dirstate.parents() |
|
3113 if not opts.get('rev') and p2 != nullid: |
|
3114 raise util.Abort(_('uncommitted merge - please provide a ' |
|
3115 'specific revision')) |
|
3116 ctx = cmdutil.revsingle(repo, opts.get('rev')) |
3117 ctx = cmdutil.revsingle(repo, opts.get('rev')) |
3117 node = ctx.node() |
3118 node = ctx.node() |
3118 mf = ctx.manifest() |
3119 mf = ctx.manifest() |
3119 if node == parent: |
3120 if node == parent: |
3120 pmf = mf |
3121 pmf = mf |