Added support of subversion.
This commit is contained in:
committed by
Loic d'Anterroches
parent
763d7ca7f6
commit
ccc41c86b0
@@ -56,6 +56,14 @@ class IDF_Diff
|
||||
$current_chunk = 0;
|
||||
continue;
|
||||
}
|
||||
if (0 === strpos($line, 'Index: ')) {
|
||||
$current_file = self::getSvnFile($line);
|
||||
$files[$current_file] = array();
|
||||
$files[$current_file]['chunks'] = array();
|
||||
$files[$current_file]['chunks_def'] = array();
|
||||
$current_chunk = 0;
|
||||
continue;
|
||||
}
|
||||
if (0 === strpos($line, '@@ ')) {
|
||||
$files[$current_file]['chunks_def'][] = self::getChunk($line);
|
||||
$files[$current_file]['chunks'][] = array();
|
||||
@@ -95,6 +103,11 @@ class IDF_Diff
|
||||
return trim(substr($line, 3, $n-3));
|
||||
}
|
||||
|
||||
public static function getSvnFile($line)
|
||||
{
|
||||
return substr(trim($line), 7);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the html version of a parsed diff.
|
||||
*/
|
||||
|
Reference in New Issue
Block a user