Mercurial > public > mercurial-scm > hg
comparison mercurial/commands.py @ 11941:4532c44bb62d
revert: use opts.get
If you want to programatically perform a revert right now you need to
include a date=False parameter due to the use of opt["date"] instead
of opt.get("date").
author | Xavier Snelgrove <xs@wxs.ca> |
---|---|
date | Fri, 13 Aug 2010 13:59:26 -0400 |
parents | 73112cb2a6d7 |
children | 52ec5c813723 |
comparison
equal
deleted
inserted
replaced
11940:106311e7740f | 11941:4532c44bb62d |
---|---|
3064 To disable these backups, use --no-backup. | 3064 To disable these backups, use --no-backup. |
3065 | 3065 |
3066 Returns 0 on success. | 3066 Returns 0 on success. |
3067 """ | 3067 """ |
3068 | 3068 |
3069 if opts["date"]: | 3069 if opts.get("date"): |
3070 if opts["rev"]: | 3070 if opts.get("rev"): |
3071 raise util.Abort(_("you can't specify a revision and a date")) | 3071 raise util.Abort(_("you can't specify a revision and a date")) |
3072 opts["rev"] = cmdutil.finddate(ui, repo, opts["date"]) | 3072 opts["rev"] = cmdutil.finddate(ui, repo, opts["date"]) |
3073 | 3073 |
3074 if not pats and not opts.get('all'): | 3074 if not pats and not opts.get('all'): |
3075 raise util.Abort(_('no files or directories specified; ' | 3075 raise util.Abort(_('no files or directories specified; ' |