mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-25 16:22:43 +01:00
Minor fixes.
This commit is contained in:
parent
a3cd33da19
commit
4196bfb3ef
3 changed files with 24 additions and 6 deletions
|
@ -52,3 +52,5 @@ alter table phabricator_repository.repository_commit add unique key
|
|||
alter table phabricator_repository.repository_commit add key
|
||||
(repositoryID, epoch);
|
||||
|
||||
alter table phabricator_repository.repository_filesystem
|
||||
add key (repositoryID, pathID, svnCommit);
|
|
@ -59,7 +59,7 @@ final class DiffusionSvnBrowseQuery extends DiffusionBrowseQuery {
|
|||
$slice_clause);
|
||||
|
||||
if (!$index) {
|
||||
if ($this->path == '/') {
|
||||
if ($path == '/') {
|
||||
$this->reason = self::REASON_IS_EMPTY;
|
||||
} else {
|
||||
$reasons = queryfx_all(
|
||||
|
|
|
@ -27,11 +27,27 @@ final class DiffusionSvnFileContentQuery extends DiffusionFileContentQuery {
|
|||
|
||||
$remote_uri = $repository->getDetail('remote-uri');
|
||||
|
||||
list($corpus) = execx(
|
||||
'svn --non-interactive cat %s%s@%s',
|
||||
$remote_uri,
|
||||
$path,
|
||||
$commit);
|
||||
try {
|
||||
list($corpus) = execx(
|
||||
'svn --non-interactive cat %s%s@%s',
|
||||
$remote_uri,
|
||||
$path,
|
||||
$commit);
|
||||
} catch (CommandException $ex) {
|
||||
$stderr = $ex->getStdErr();
|
||||
if (preg_match('/path not found$/', trim($stderr))) {
|
||||
// TODO: Improve user experience for this. One way to end up here
|
||||
// is to have the parser behind and look at a file which was recently
|
||||
// nuked; Diffusion will think it still exists and try to grab content
|
||||
// at HEAD.
|
||||
throw new Exception(
|
||||
"Failed to retrieve file content from Subversion. The file may ".
|
||||
"have been recently deleted, or the Diffusion cache may be out of ".
|
||||
"date.");
|
||||
} else {
|
||||
throw $ex;
|
||||
}
|
||||
}
|
||||
|
||||
$file_content = new DiffusionFileContent();
|
||||
$file_content->setCorpus($corpus);
|
||||
|
|
Loading…
Reference in a new issue