Rewrite the diff parser and reduce the memory footprint.
The diff parser code was rewritten for clarity and speed and now handles a couple of ugly cornercases, like SVN's property change output and single change chunks, much better. Since the path parsing was unified as well, the SCM interface gained a new method `getPathStripLevel()` which determines how many path components need to be shoven off a file name for the SCM to form a valid path in the workspace (similar to patch(1)'s --strip option). Fixes issue 627. Automated tests follow.
This commit is contained in:
committed by
Thomas Keller
parent
6fb9b72e22
commit
baa88412b9
@@ -649,6 +649,14 @@ class IDF_Scm_Git extends IDF_Scm
|
||||
return new Pluf_HTTP_Response_CommandPassThru($cmd, 'application/x-zip');
|
||||
}
|
||||
|
||||
/**
|
||||
* @see IDF_Scm::getDiffPathStripLevel()
|
||||
*/
|
||||
public function getDiffPathStripLevel()
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
/*
|
||||
* =====================================================
|
||||
* Specific Git Commands
|
||||
|
@@ -464,4 +464,12 @@ class IDF_Scm_Mercurial extends IDF_Scm
|
||||
escapeshellarg($commit));
|
||||
return new Pluf_HTTP_Response_CommandPassThru($cmd, 'application/x-zip');
|
||||
}
|
||||
|
||||
/**
|
||||
* @see IDF_Scm::getDiffPathStripLevel()
|
||||
*/
|
||||
public function getDiffPathStripLevel()
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user