1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-19 13:22:42 +01:00

Fix two issues with ref discovery

Summary:
See IRC. I'm having trouble figuring out what's going on with b4taylor's report, but fix two possible issues:

  # The commit query is missing a `repositoryID`, which could cause issues if you import two copies of the same repository.
  # I think we may try to close commits on untracked branches right now, as long as they aren't excluded by other autoclose rules.

Test Plan: Ran `bin/repository refs` on a few repos.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran, brennantaylor

Differential Revision: https://secure.phabricator.com/D8373
This commit is contained in:
epriestley 2014-02-28 12:56:18 -08:00
parent cfd274fec0
commit e28b78f5eb
2 changed files with 6 additions and 1 deletions

View file

@ -304,8 +304,9 @@ final class PhabricatorRepositoryRefEngine
$all_commits = queryfx_all(
$conn_w,
'SELECT id, commitIdentifier, importStatus FROM %T
WHERE commitIdentifier IN (%Ls)',
WHERE repositoryID = %d AND commitIdentifier IN (%Ls)',
$commit_table->getTableName(),
$repository->getID(),
$identifiers);
$closeable_flag = PhabricatorRepositoryCommit::IMPORTED_CLOSEABLE;

View file

@ -592,6 +592,10 @@ final class PhabricatorRepository extends PhabricatorRepositoryDAO
return false;
}
if (!$this->shouldTrackBranch($branch)) {
return false;
}
return $this->isBranchInFilter($branch, 'close-commits-filter');
}