mercurial/patch.py
changeset 15528 a84698badf0b
parent 15510 5414b56cfad6
child 15591 97fc5eec3f43
equal deleted inserted replaced
15527:9926aab3d0b5 15528:a84698badf0b
  1525     return ''.join(ret)
  1525     return ''.join(ret)
  1526 
  1526 
  1527 class GitDiffRequired(Exception):
  1527 class GitDiffRequired(Exception):
  1528     pass
  1528     pass
  1529 
  1529 
  1530 def diffopts(ui, opts=None, untrusted=False):
  1530 def diffopts(ui, opts=None, untrusted=False, section='diff'):
  1531     def get(key, name=None, getter=ui.configbool):
  1531     def get(key, name=None, getter=ui.configbool):
  1532         return ((opts and opts.get(key)) or
  1532         return ((opts and opts.get(key)) or
  1533                 getter('diff', name or key, None, untrusted=untrusted))
  1533                 getter(section, name or key, None, untrusted=untrusted))
  1534     return mdiff.diffopts(
  1534     return mdiff.diffopts(
  1535         text=opts and opts.get('text'),
  1535         text=opts and opts.get('text'),
  1536         git=get('git'),
  1536         git=get('git'),
  1537         nodates=get('nodates'),
  1537         nodates=get('nodates'),
  1538         showfunc=get('show_function', 'showfunc'),
  1538         showfunc=get('show_function', 'showfunc'),