324 if dopatch == 'filter': |
324 if dopatch == 'filter': |
325 os.unlink(patchname) |
325 os.unlink(patchname) |
326 |
326 |
327 return fuzz |
327 return fuzz |
328 |
328 |
329 def diffopts(ui, opts={}): |
329 def diffopts(ui, opts={}, untrusted=False): |
|
330 def get(key, name=None): |
|
331 return (opts.get(key) or |
|
332 ui.configbool('diff', name or key, None, untrusted=untrusted)) |
330 return mdiff.diffopts( |
333 return mdiff.diffopts( |
331 text=opts.get('text'), |
334 text=opts.get('text'), |
332 git=(opts.get('git') or |
335 git=get('git'), |
333 ui.configbool('diff', 'git', None)), |
336 nodates=get('nodates'), |
334 nodates=(opts.get('nodates') or |
337 showfunc=get('show_function', 'showfunc'), |
335 ui.configbool('diff', 'nodates', None)), |
338 ignorews=get('ignore_all_space', 'ignorews'), |
336 showfunc=(opts.get('show_function') or |
339 ignorewsamount=get('ignore_space_change', 'ignorewsamount'), |
337 ui.configbool('diff', 'showfunc', None)), |
340 ignoreblanklines=get('ignore_blank_lines', 'ignoreblanklines')) |
338 ignorews=(opts.get('ignore_all_space') or |
|
339 ui.configbool('diff', 'ignorews', None)), |
|
340 ignorewsamount=(opts.get('ignore_space_change') or |
|
341 ui.configbool('diff', 'ignorewsamount', None)), |
|
342 ignoreblanklines=(opts.get('ignore_blank_lines') or |
|
343 ui.configbool('diff', 'ignoreblanklines', None))) |
|
344 |
341 |
345 def updatedir(ui, repo, patches, wlock=None): |
342 def updatedir(ui, repo, patches, wlock=None): |
346 '''Update dirstate after patch application according to metadata''' |
343 '''Update dirstate after patch application according to metadata''' |
347 if not patches: |
344 if not patches: |
348 return |
345 return |