Mercurial > public > mercurial-scm > hg
diff 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 |
line wrap: on
line diff
--- a/mercurial/commands.py Tue Aug 17 08:38:31 2010 +0530 +++ b/mercurial/commands.py Fri Aug 13 13:59:26 2010 -0400 @@ -3066,8 +3066,8 @@ Returns 0 on success. """ - if opts["date"]: - if opts["rev"]: + if opts.get("date"): + if opts.get("rev"): raise util.Abort(_("you can't specify a revision and a date")) opts["rev"] = cmdutil.finddate(ui, repo, opts["date"])