1053 if rejects: |
1053 if rejects: |
1054 return -1 |
1054 return -1 |
1055 return err |
1055 return err |
1056 |
1056 |
1057 def diffopts(ui, opts={}, untrusted=False): |
1057 def diffopts(ui, opts={}, untrusted=False): |
1058 def get(key, name=None): |
1058 def get(key, name=None, getter=ui.configbool): |
1059 return (opts.get(key) or |
1059 return (opts.get(key) or |
1060 ui.configbool('diff', name or key, None, untrusted=untrusted)) |
1060 getter('diff', name or key, None, untrusted=untrusted)) |
1061 return mdiff.diffopts( |
1061 return mdiff.diffopts( |
1062 text=opts.get('text'), |
1062 text=opts.get('text'), |
1063 git=get('git'), |
1063 git=get('git'), |
1064 nodates=get('nodates'), |
1064 nodates=get('nodates'), |
1065 showfunc=get('show_function', 'showfunc'), |
1065 showfunc=get('show_function', 'showfunc'), |
1066 ignorews=get('ignore_all_space', 'ignorews'), |
1066 ignorews=get('ignore_all_space', 'ignorews'), |
1067 ignorewsamount=get('ignore_space_change', 'ignorewsamount'), |
1067 ignorewsamount=get('ignore_space_change', 'ignorewsamount'), |
1068 ignoreblanklines=get('ignore_blank_lines', 'ignoreblanklines'), |
1068 ignoreblanklines=get('ignore_blank_lines', 'ignoreblanklines'), |
1069 context=get('unified')) |
1069 context=get('unified', getter=ui.config)) |
1070 |
1070 |
1071 def updatedir(ui, repo, patches): |
1071 def updatedir(ui, repo, patches): |
1072 '''Update dirstate after patch application according to metadata''' |
1072 '''Update dirstate after patch application according to metadata''' |
1073 if not patches: |
1073 if not patches: |
1074 return |
1074 return |