mercurial/patch.py
changeset 34908 907ff34e1460
parent 34856 890afefa7296
child 34964 7ebf850d3166
equal deleted inserted replaced
34907:0ccfc468423a 34908:907ff34e1460
  2328             repo, node1=node1, node2=node2,
  2328             repo, node1=node1, node2=node2,
  2329             match=match, changes=changes, opts=opts,
  2329             match=match, changes=changes, opts=opts,
  2330             losedatafn=losedatafn, prefix=prefix, relroot=relroot, copy=copy,
  2330             losedatafn=losedatafn, prefix=prefix, relroot=relroot, copy=copy,
  2331     ):
  2331     ):
  2332         if hunksfilterfn is not None:
  2332         if hunksfilterfn is not None:
       
  2333             # If the file has been removed, fctx2 is None; but this should
       
  2334             # not occur here since we catch removed files early in
       
  2335             # cmdutil.getloglinerangerevs() for 'hg log -L'.
       
  2336             assert fctx2 is not None, \
       
  2337                 'fctx2 unexpectly None in diff hunks filtering'
  2333             hunks = hunksfilterfn(fctx2, hunks)
  2338             hunks = hunksfilterfn(fctx2, hunks)
  2334         text = ''.join(sum((list(hlines) for hrange, hlines in hunks), []))
  2339         text = ''.join(sum((list(hlines) for hrange, hlines in hunks), []))
  2335         if hdr and (text or len(hdr) > 1):
  2340         if hdr and (text or len(hdr) > 1):
  2336             yield '\n'.join(hdr) + '\n'
  2341             yield '\n'.join(hdr) + '\n'
  2337         if text:
  2342         if text: