Mercurial > hg
comparison hgext/extdiff.py @ 23152:b8f6d840d3ec
merge with stable
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Mon, 03 Nov 2014 16:56:32 -0600 |
parents | 733d980b9c59 72a89cf86fcd |
children | 41c03b7592ed |
comparison
equal
deleted
inserted
replaced
23151:733d980b9c59 | 23152:b8f6d840d3ec |
---|---|
118 - just invoke the diff for a single file in the working dir | 118 - just invoke the diff for a single file in the working dir |
119 ''' | 119 ''' |
120 | 120 |
121 revs = opts.get('rev') | 121 revs = opts.get('rev') |
122 change = opts.get('change') | 122 change = opts.get('change') |
123 args = ' '.join(diffopts) | 123 args = ' '.join(map(util.shellquote, diffopts)) |
124 do3way = '$parent2' in args | 124 do3way = '$parent2' in args |
125 | 125 |
126 if revs and change: | 126 if revs and change: |
127 msg = _('cannot specify --rev and --change at the same time') | 127 msg = _('cannot specify --rev and --change at the same time') |
128 raise util.Abort(msg) | 128 raise util.Abort(msg) |
279 cmd = cmd[4:] | 279 cmd = cmd[4:] |
280 if not path: | 280 if not path: |
281 path = util.findexe(cmd) | 281 path = util.findexe(cmd) |
282 if path is None: | 282 if path is None: |
283 path = filemerge.findexternaltool(ui, cmd) or cmd | 283 path = filemerge.findexternaltool(ui, cmd) or cmd |
284 diffopts = ui.config('extdiff', 'opts.' + cmd, '') | 284 diffopts = shlex.split(ui.config('extdiff', 'opts.' + cmd, '')) |
285 diffopts = diffopts and [diffopts] or [] | |
286 elif cmd.startswith('opts.'): | 285 elif cmd.startswith('opts.'): |
287 continue | 286 continue |
288 else: | 287 else: |
289 # command = path opts | 288 # command = path opts |
290 if path: | 289 if path: |