comparison hgext/extdiff.py @ 9519:0d3c1aa9d5de

extdiff: fix defaulting to "diff" if no --program is given
author Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
date Thu, 01 Oct 2009 08:50:10 +0200
parents 9dda4c73fc3b
children d932dc655881
comparison
equal deleted inserted replaced
9507:5987183d6e59 9519:0d3c1aa9d5de
171 When two revision arguments are given, then changes are shown 171 When two revision arguments are given, then changes are shown
172 between those revisions. If only one revision is specified then 172 between those revisions. If only one revision is specified then
173 that revision is compared to the working directory, and, when no 173 that revision is compared to the working directory, and, when no
174 revisions are specified, the working directory files are compared 174 revisions are specified, the working directory files are compared
175 to its parent.''' 175 to its parent.'''
176 program = opts['program'] or 'diff' 176 program = opts.get('program')
177 if opts['program']: 177 option = opts.get('option')
178 option = opts['option'] 178 if not program:
179 else: 179 program = 'diff'
180 option = opts['option'] or ['-Npru'] 180 option = option or ['-Npru']
181 return dodiff(ui, repo, program, option, pats, opts) 181 return dodiff(ui, repo, program, option, pats, opts)
182 182
183 cmdtable = { 183 cmdtable = {
184 "extdiff": 184 "extdiff":
185 (extdiff, 185 (extdiff,