# HG changeset patch # User Peter Arrenbrecht # Date 2009-10-01 06:50:10 # Node ID 0d3c1aa9d5de3154f350b180aabd22bde3db7f58 # Parent 5987183d6e59bef5e82d10744a4ce059bbc08cba extdiff: fix defaulting to "diff" if no --program is given diff --git a/hgext/extdiff.py b/hgext/extdiff.py --- a/hgext/extdiff.py +++ b/hgext/extdiff.py @@ -173,11 +173,11 @@ def extdiff(ui, repo, *pats, **opts): that revision is compared to the working directory, and, when no revisions are specified, the working directory files are compared to its parent.''' - program = opts['program'] or 'diff' - if opts['program']: - option = opts['option'] - else: - option = opts['option'] or ['-Npru'] + program = opts.get('program') + option = opts.get('option') + if not program: + program = 'diff' + option = option or ['-Npru'] return dodiff(ui, repo, program, option, pats, opts) cmdtable = {