Fixed issue 96, errors when parsing a Mercurial diff.
This commit is contained in:
parent
2078d69a83
commit
c33b271519
@ -55,8 +55,14 @@ class IDF_Diff
|
|||||||
$files[$current_file]['chunks_def'] = array();
|
$files[$current_file]['chunks_def'] = array();
|
||||||
$current_chunk = 0;
|
$current_chunk = 0;
|
||||||
continue;
|
continue;
|
||||||
}
|
} else if (preg_match('#^diff -r [^\s]+ -r [^\s]+ (.+)$#', $line, $matches)) {
|
||||||
if (0 === strpos($line, 'Index: ')) {
|
$current_file = $matches[1];
|
||||||
|
$files[$current_file] = array();
|
||||||
|
$files[$current_file]['chunks'] = array();
|
||||||
|
$files[$current_file]['chunks_def'] = array();
|
||||||
|
$current_chunk = 0;
|
||||||
|
continue;
|
||||||
|
} else if (0 === strpos($line, 'Index: ')) {
|
||||||
$current_file = self::getSvnFile($line);
|
$current_file = self::getSvnFile($line);
|
||||||
$files[$current_file] = array();
|
$files[$current_file] = array();
|
||||||
$files[$current_file]['chunks'] = array();
|
$files[$current_file]['chunks'] = array();
|
||||||
|
Loading…
Reference in New Issue
Block a user