##// END OF EJS Templates
patch/diff: move diff related code next to each other
Benoit Boissinot -
r10615:3bb438ce default
parent child Browse files
Show More
@@ -1175,20 +1175,6 b' def applydiff(ui, fp, changed, strip=1, '
1175 1175 return -1
1176 1176 return err
1177 1177
1178 def diffopts(ui, opts=None, untrusted=False):
1179 def get(key, name=None, getter=ui.configbool):
1180 return ((opts and opts.get(key)) or
1181 getter('diff', name or key, None, untrusted=untrusted))
1182 return mdiff.diffopts(
1183 text=opts and opts.get('text'),
1184 git=get('git'),
1185 nodates=get('nodates'),
1186 showfunc=get('show_function', 'showfunc'),
1187 ignorews=get('ignore_all_space', 'ignorews'),
1188 ignorewsamount=get('ignore_space_change', 'ignorewsamount'),
1189 ignoreblanklines=get('ignore_blank_lines', 'ignoreblanklines'),
1190 context=get('unified', getter=ui.config))
1191
1192 1178 def updatedir(ui, repo, patches, similarity=0):
1193 1179 '''Update dirstate after patch application according to metadata'''
1194 1180 if not patches:
@@ -1376,6 +1362,20 b' def b85diff(to, tn):'
1376 1362 class GitDiffRequired(Exception):
1377 1363 pass
1378 1364
1365 def diffopts(ui, opts=None, untrusted=False):
1366 def get(key, name=None, getter=ui.configbool):
1367 return ((opts and opts.get(key)) or
1368 getter('diff', name or key, None, untrusted=untrusted))
1369 return mdiff.diffopts(
1370 text=opts and opts.get('text'),
1371 git=get('git'),
1372 nodates=get('nodates'),
1373 showfunc=get('show_function', 'showfunc'),
1374 ignorews=get('ignore_all_space', 'ignorews'),
1375 ignorewsamount=get('ignore_space_change', 'ignorewsamount'),
1376 ignoreblanklines=get('ignore_blank_lines', 'ignoreblanklines'),
1377 context=get('unified', getter=ui.config))
1378
1379 1379 def diff(repo, node1=None, node2=None, match=None, changes=None, opts=None,
1380 1380 losedatafn=None):
1381 1381 '''yields diff of changes to files between two nodes, or node and
General Comments 0
You need to be logged in to leave comments. Login now