Added support of subversion.

This commit is contained in:
Nicolas LASSALLE
2008-08-29 19:50:10 +02:00
committed by Loic d'Anterroches
parent 763d7ca7f6
commit ccc41c86b0
14 changed files with 713 additions and 35 deletions

View File

@@ -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.
*/