mercurial/mdiff.py
changeset 4357 99c853a1408c
parent 4107 226df1808f16
child 4679 826659bd8053
equal deleted inserted replaced
4356:10edaed7f909 4357:99c853a1408c
   248     return "".join(t)
   248     return "".join(t)
   249 
   249 
   250 def patch(a, bin):
   250 def patch(a, bin):
   251     return mpatch.patches(a, [bin])
   251     return mpatch.patches(a, [bin])
   252 
   252 
       
   253 # similar to difflib.SequenceMatcher.get_matching_blocks
       
   254 def get_matching_blocks(a, b):
       
   255     return [(d[0], d[2], d[1] - d[0]) for d in bdiff.blocks(a, b)]
       
   256 
   253 patches = mpatch.patches
   257 patches = mpatch.patches
   254 patchedsize = mpatch.patchedsize
   258 patchedsize = mpatch.patchedsize
   255 textdiff = bdiff.bdiff
   259 textdiff = bdiff.bdiff