diff hgext/extdiff.py @ 3124:f145d04899d2

extdiff: use the default option only if the default program is used
author TK Soh <teekaysoh@yahoo.com>
date Mon, 18 Sep 2006 12:01:32 +0200
parents 8e8deb8035a4
children 49966b5ab16f
line wrap: on
line diff
--- a/hgext/extdiff.py
+++ b/hgext/extdiff.py
@@ -137,8 +137,12 @@ def extdiff(ui, repo, *pats, **opts):
     specified then that revision is compared to the working
     directory, and, when no revisions are specified, the
     working directory files are compared to its parent.'''
-    return dodiff(ui, repo, opts['program'] or 'diff',
-                  opts['option'] or ['-Npru'], pats, opts)
+    program = opts['program'] or 'diff'
+    if opts['program']:
+        option = opts['option']
+    else:
+        option = opts['option'] or ['-Npru']
+    return dodiff(ui, repo, program, option, pats, opts)
 
 cmdtable = {
     "extdiff":