Commit 6055ebc2 authored by Aurel's avatar Aurel

change format of data returned by the method so that we can later

access subblocks


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@37860 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 94ec7417
...@@ -149,7 +149,7 @@ class DiffFile: ...@@ -149,7 +149,7 @@ class DiffFile:
def getModifiedBlockList(self): def getModifiedBlockList(self):
""" """
Return a list of modified blocks Return a list of modified blocks
List contains tuples (old_modified_code, new_modified_code) List contains tuples (block object : (old_modified_code, new_modified_code))
""" """
if self.binary: if self.binary:
return [] return []
...@@ -159,7 +159,8 @@ class DiffFile: ...@@ -159,7 +159,8 @@ class DiffFile:
if x[0] is not None and x[1] == MODIFIED_DIFF_COLOR] if x[0] is not None and x[1] == MODIFIED_DIFF_COLOR]
new_line_list = [x[0].strip() for x in child.getNewCodeList() new_line_list = [x[0].strip() for x in child.getNewCodeList()
if x[0] is not None and x[1] == MODIFIED_DIFF_COLOR] if x[0] is not None and x[1] == MODIFIED_DIFF_COLOR]
block_list.append((old_line_list, new_line_list)) if old_line_list and new_line_list:
block_list.append((child,(old_line_list, new_line_list)))
return block_list return block_list
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment