1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-19 03:50:54 +01:00

Make SVN commit parsers actually parse commits again.

This commit is contained in:
epriestley 2011-03-27 00:39:29 -07:00
parent 01b2a6bbe1
commit 63a3edb29f
3 changed files with 12 additions and 5 deletions

View file

@ -54,11 +54,15 @@ abstract class PhabricatorRepositoryCommitParserWorker
* This method is kind of awkward here but both the SVN message and
* change parsers use it.
*/
protected function getSVNLogXMLObject($uri, $revision) {
protected function getSVNLogXMLObject($uri, $revision, $verbose = false) {
if ($verbose) {
$verbose = '--verbose';
}
try {
list($xml) = execx(
'svn log --xml --limit 1 --non-interactive %s@%d',
"svn log --xml {$verbose} --limit 1 --non-interactive %s@%d",
$uri,
$revision);
} catch (CommandException $ex) {
@ -72,7 +76,7 @@ abstract class PhabricatorRepositoryCommitParserWorker
}
$fallback_uri->setProtocol('svn+ssh');
list($xml) = execx(
'svn log --xml --limit 1 --non-interactive %s@%d',
"svn log --xml {$verbose} --limit 1 --non-interactive %s@%d",
$fallback_uri,
$revision);
}

View file

@ -54,7 +54,7 @@ class PhabricatorRepositorySvnCommitChangeParserWorker
// Pull the top-level path changes out of "svn log". This is pretty
// straightforward; just parse the XML log.
$log = $this->getSVNLogXMLObject($uri, $svn_commit);
$log = $this->getSVNLogXMLObject($uri, $svn_commit, $verbose = true);
$entry = $log->logentry[0];

View file

@ -25,7 +25,10 @@ class PhabricatorRepositorySvnCommitMessageParserWorker
$uri = $repository->getDetail('remote-uri');
$log = $this->getSVNLogXMLObject($uri, $commit->getCommitIdentifier());
$log = $this->getSVNLogXMLObject(
$uri,
$commit->getCommitIdentifier(),
$verbose = false);
$entry = $log->logentry[0];