mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-25 06:50:55 +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:
parent
cfd274fec0
commit
e28b78f5eb
2 changed files with 6 additions and 1 deletions
|
@ -304,8 +304,9 @@ final class PhabricatorRepositoryRefEngine
|
||||||
$all_commits = queryfx_all(
|
$all_commits = queryfx_all(
|
||||||
$conn_w,
|
$conn_w,
|
||||||
'SELECT id, commitIdentifier, importStatus FROM %T
|
'SELECT id, commitIdentifier, importStatus FROM %T
|
||||||
WHERE commitIdentifier IN (%Ls)',
|
WHERE repositoryID = %d AND commitIdentifier IN (%Ls)',
|
||||||
$commit_table->getTableName(),
|
$commit_table->getTableName(),
|
||||||
|
$repository->getID(),
|
||||||
$identifiers);
|
$identifiers);
|
||||||
|
|
||||||
$closeable_flag = PhabricatorRepositoryCommit::IMPORTED_CLOSEABLE;
|
$closeable_flag = PhabricatorRepositoryCommit::IMPORTED_CLOSEABLE;
|
||||||
|
|
|
@ -592,6 +592,10 @@ final class PhabricatorRepository extends PhabricatorRepositoryDAO
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!$this->shouldTrackBranch($branch)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
return $this->isBranchInFilter($branch, 'close-commits-filter');
|
return $this->isBranchInFilter($branch, 'close-commits-filter');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue