Index: src/applications/repository/engine/PhabricatorRepositoryDiscoveryEngine.php =================================================================== --- src/applications/repository/engine/PhabricatorRepositoryDiscoveryEngine.php +++ src/applications/repository/engine/PhabricatorRepositoryDiscoveryEngine.php @@ -88,10 +88,9 @@ try { list($xml, $stderr) = $repository->execxRemoteCommand( - 'log --xml --quiet --limit %d %s@%s', + 'log --xml --quiet --limit %d %s', $limit, - $repository->getSubversionBaseURI(), - $at_rev); + $repository->getSubversionBaseURI($at_rev)); } catch (CommandException $ex) { $stderr = $ex->getStdErr(); if (preg_match('/(path|File) not found/', $stderr)) { Index: src/applications/repository/storage/PhabricatorRepository.php =================================================================== --- src/applications/repository/storage/PhabricatorRepository.php +++ src/applications/repository/storage/PhabricatorRepository.php @@ -155,12 +155,12 @@ return $this->getDetail('local-path'); } - public function getSubversionBaseURI() { + public function getSubversionBaseURI($commit = null) { $subpath = $this->getDetail('svn-subpath'); if (!strlen($subpath)) { $subpath = null; } - return $this->getSubversionPathURI($subpath); + return $this->getSubversionPathURI($subpath, $commit); } public function getSubversionPathURI($path = null, $commit = null) { Index: src/applications/repository/storage/__tests__/PhabricatorRepositoryTestCase.php =================================================================== --- src/applications/repository/storage/__tests__/PhabricatorRepositoryTestCase.php +++ src/applications/repository/storage/__tests__/PhabricatorRepositoryTestCase.php @@ -94,6 +94,17 @@ $this->assertEqual( 'file:///var/repo/SVN/%3F@22', $repo->getSubversionPathURI('?', 22)); + + $repo->setDetail('svn-subpath', 'quack/trunk/'); + + $this->assertEqual( + 'file:///var/repo/SVN/quack/trunk/@', + $repo->getSubversionBaseURI()); + + $this->assertEqual( + 'file:///var/repo/SVN/quack/trunk/@HEAD', + $repo->getSubversionBaseURI('HEAD')); + }