Mercurial > hg
changeset 17308:2e0805f59736 stable
log: make opts entries optional (issue2423)
author | Patrick Mezard <patrick@mezard.eu> |
---|---|
date | Wed, 01 Aug 2012 15:49:00 +0200 |
parents | a028ce66e2b7 |
children | d5bbb29a80ae |
files | mercurial/cmdutil.py mercurial/commands.py |
diffstat | 2 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/cmdutil.py Tue Jul 31 19:47:54 2012 +0200 +++ b/mercurial/cmdutil.py Wed Aug 01 15:49:00 2012 +0200 @@ -996,7 +996,7 @@ defrange = '%s:0' % repo['.'].rev() else: defrange = '-1:0' - revs = scmutil.revrange(repo, opts['rev'] or [defrange]) + revs = scmutil.revrange(repo, opts.get('rev') or [defrange]) if not revs: return [] wanted = set()
--- a/mercurial/commands.py Tue Jul 31 19:47:54 2012 +0200 +++ b/mercurial/commands.py Wed Aug 01 15:49:00 2012 +0200 @@ -4074,7 +4074,7 @@ getrenamed = templatekw.getrenamedfn(repo, endrev=endrev) df = False - if opts["date"]: + if opts.get("date"): df = util.matchdate(opts["date"]) branches = opts.get('branch', []) + opts.get('only_branch', [])