changeset 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 106311e7740f
children 50a4e55aa278
files mercurial/commands.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
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"])