[PATCH] extdiff: fix defaulting to "diff" if no --program is given
Peter Arrenbrecht
peter.arrenbrecht at gmail.com
Thu Oct 1 01:51:28 CDT 2009
# HG changeset patch
# User Peter Arrenbrecht <peter.arrenbrecht at gmail.com>
# Date 1254379810 -7200
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 @@
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 = {
More information about the Mercurial-devel
mailing list