mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-10 00:42:41 +01:00
Various fixes for hosted and non-hosted subversion queries in Diffusion.
Summary: There were a number of places that were generating nonsense queries for both hosted and non-hosted subversion repositories. Test Plan: Attempted several activities in Diffusion with both a hosted and non-hosted subversion repository, including viewing various types of diffs and raw files. Reviewers: epriestley, #blessed_reviewers Reviewed By: epriestley CC: Korvin, epriestley, aran Differential Revision: https://secure.phabricator.com/D7799
This commit is contained in:
parent
c179ce6279
commit
264bef58c4
3 changed files with 6 additions and 13 deletions
|
@ -193,10 +193,8 @@ final class ConduitAPI_diffusion_diffquery_Method
|
|||
|
||||
list($ref, $rev) = $spec;
|
||||
return $repository->getRemoteCommandFuture(
|
||||
'cat %s%s@%d',
|
||||
$repository->getRemoteURI(),
|
||||
phutil_escape_uri($ref),
|
||||
$rev);
|
||||
'cat %s',
|
||||
$repository->getSubversionPathURI($ref, $rev));
|
||||
}
|
||||
|
||||
private function getGitOrMercurialResult(ConduitAPIRequest $request) {
|
||||
|
|
|
@ -9,14 +9,10 @@ final class DiffusionSvnFileContentQuery extends DiffusionFileContentQuery {
|
|||
$path = $drequest->getPath();
|
||||
$commit = $drequest->getCommit();
|
||||
|
||||
$remote_uri = $repository->getRemoteURI();
|
||||
|
||||
return $repository->getRemoteCommandFuture(
|
||||
'%C %s%s@%s',
|
||||
'%C %s',
|
||||
$this->getNeedsBlame() ? 'blame --force' : 'cat',
|
||||
$remote_uri,
|
||||
phutil_escape_uri($path),
|
||||
$commit);
|
||||
$repository->getSubversionPathURI($path, $commit));
|
||||
}
|
||||
|
||||
protected function executeQueryFromFuture(Future $future) {
|
||||
|
|
|
@ -15,13 +15,12 @@ final class DiffusionSvnRawDiffQuery extends DiffusionRawDiffQuery {
|
|||
}
|
||||
|
||||
$future = $repository->getRemoteCommandFuture(
|
||||
'diff --diff-cmd %s -x -U%d -r %d:%d %s%s@',
|
||||
'diff --diff-cmd %s -x -U%d -r %d:%d %s',
|
||||
$arc_root.'/../scripts/repository/binary_safe_diff.sh',
|
||||
$this->getLinesOfContext(),
|
||||
$against,
|
||||
$commit,
|
||||
$repository->getRemoteURI(),
|
||||
$drequest->getPath());
|
||||
$repository->getSubversionPathURI($drequest->getPath()));
|
||||
|
||||
if ($this->getTimeout()) {
|
||||
$future->setTimeout($this->getTimeout());
|
||||
|
|
Loading…
Reference in a new issue