mercurial/patch.py
changeset 24371 8a997bd73448
parent 24346 31edcea517c1
child 24385 885a573fa619
equal deleted inserted replaced
24370:3e8b06097d00 24371:8a997bd73448
  2224                     continue
  2224                     continue
  2225         yield f1, f2, copyop
  2225         yield f1, f2, copyop
  2226 
  2226 
  2227 def trydiff(repo, revs, ctx1, ctx2, modified, added, removed,
  2227 def trydiff(repo, revs, ctx1, ctx2, modified, added, removed,
  2228             copy, getfilectx, opts, losedatafn, prefix):
  2228             copy, getfilectx, opts, losedatafn, prefix):
       
  2229     '''given input data, generate a diff and yield it in blocks
       
  2230 
       
  2231     If generating a diff would lose data like flags or binary data and
       
  2232     losedatafn is not None, it will be called.
       
  2233 
       
  2234     prefix is added to every path in the diff output.'''
  2229 
  2235 
  2230     def gitindex(text):
  2236     def gitindex(text):
  2231         if not text:
  2237         if not text:
  2232             text = ""
  2238             text = ""
  2233         l = len(text)
  2239         l = len(text)