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:
parent
01b2a6bbe1
commit
63a3edb29f
3 changed files with 12 additions and 5 deletions
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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];
|
||||
|
||||
|
|
|
@ -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];
|
||||
|
||||
|
|
Loading…
Reference in a new issue