예제 #1
0
파일: __init__.py 프로젝트: ahornby/eden
 def _alldiffchunks(a, b, alines, blines):
     """like mdiff.allblocks, but only care about differences"""
     blocks = mdiff.allblocks(a, b, lines1=alines, lines2=blines)
     for chunk, btype in blocks:
         if btype != "!":
             continue
         yield chunk
예제 #2
0
 def setUp(self):
     self.blocks = list(mdiff.allblocks(text1, text2))
     assert self.blocks == [
         ([0, 3, 0, 2], "!"),
         ((3, 7, 2, 6), "="),
         ([7, 12, 6, 12], "!"),
         ((12, 12, 12, 12), "="),
     ], self.blocks
예제 #3
0
파일: context.py 프로젝트: simpkins/eden
 def _diffblocks(self, a, b):
     return mdiff.allblocks(a, b, self.opts.diffopts)