hgext/extdiff.py
branchstable
changeset 23138 72a89cf86fcd
parent 22202 684bad8c4265
child 23152 b8f6d840d3ec
equal deleted inserted replaced
23137:7867f15b4a38 23138:72a89cf86fcd
   119     - just invoke the diff for a single file in the working dir
   119     - just invoke the diff for a single file in the working dir
   120     '''
   120     '''
   121 
   121 
   122     revs = opts.get('rev')
   122     revs = opts.get('rev')
   123     change = opts.get('change')
   123     change = opts.get('change')
   124     args = ' '.join(diffopts)
   124     args = ' '.join(map(util.shellquote, diffopts))
   125     do3way = '$parent2' in args
   125     do3way = '$parent2' in args
   126 
   126 
   127     if revs and change:
   127     if revs and change:
   128         msg = _('cannot specify --rev and --change at the same time')
   128         msg = _('cannot specify --rev and --change at the same time')
   129         raise util.Abort(msg)
   129         raise util.Abort(msg)
   278     for cmd, path in ui.configitems('extdiff'):
   278     for cmd, path in ui.configitems('extdiff'):
   279         if cmd.startswith('cmd.'):
   279         if cmd.startswith('cmd.'):
   280             cmd = cmd[4:]
   280             cmd = cmd[4:]
   281             if not path:
   281             if not path:
   282                 path = cmd
   282                 path = cmd
   283             diffopts = ui.config('extdiff', 'opts.' + cmd, '')
   283             diffopts = shlex.split(ui.config('extdiff', 'opts.' + cmd, ''))
   284             diffopts = diffopts and [diffopts] or []
       
   285         elif cmd.startswith('opts.'):
   284         elif cmd.startswith('opts.'):
   286             continue
   285             continue
   287         else:
   286         else:
   288             # command = path opts
   287             # command = path opts
   289             if path:
   288             if path: