1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-23 22:10:55 +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 * This method is kind of awkward here but both the SVN message and
* change parsers use it. * change parsers use it.
*/ */
protected function getSVNLogXMLObject($uri, $revision) { protected function getSVNLogXMLObject($uri, $revision, $verbose = false) {
if ($verbose) {
$verbose = '--verbose';
}
try { try {
list($xml) = execx( list($xml) = execx(
'svn log --xml --limit 1 --non-interactive %s@%d', "svn log --xml {$verbose} --limit 1 --non-interactive %s@%d",
$uri, $uri,
$revision); $revision);
} catch (CommandException $ex) { } catch (CommandException $ex) {
@ -72,7 +76,7 @@ abstract class PhabricatorRepositoryCommitParserWorker
} }
$fallback_uri->setProtocol('svn+ssh'); $fallback_uri->setProtocol('svn+ssh');
list($xml) = execx( list($xml) = execx(
'svn log --xml --limit 1 --non-interactive %s@%d', "svn log --xml {$verbose} --limit 1 --non-interactive %s@%d",
$fallback_uri, $fallback_uri,
$revision); $revision);
} }

View file

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

View file

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