1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2024-11-22 14:52:40 +01:00

Don't let "arc which" identify the working copy as belonging to a different project

Summary: If you have two projects (say, libphutil and arcanist) and you prepare a patch for one of them on branch "master", run "arc diff", and then prepare a patch for the other one on the same branch, "arc diff" will try to update the first revision when you run it. Instead, make it smart enough to stay within arc projects.

Test Plan: Ran "arc which" in circumstances where it previously generated a false positive, no false positive.

Reviewers: btrahan, vrana, jungejason

Reviewed By: jungejason

CC: aran

Maniphest Tasks: T1100

Differential Revision: https://secure.phabricator.com/D2199
This commit is contained in:
epriestley 2012-04-10 16:06:57 -07:00
parent 7ea51b6bb7
commit d2915d8c5f
2 changed files with 8 additions and 3 deletions

View file

@ -745,10 +745,12 @@ final class ArcanistGitAPI extends ArcanistRepositoryAPI {
}
// If we still didn't succeed, try to find revisions by branch name.
$project = $this->getWorkingCopyIdentity()->getProjectID();
$results = $conduit->callMethodSynchronous(
'differential.query',
$query + array(
'branches' => array($this->getBranchName()),
'branches' => array($this->getBranchName()),
'arcanistProjects' => array($project),
));
return $results;

View file

@ -534,11 +534,14 @@ EODIFF;
array $query) {
// We don't have much to go on in SVN, look for revisions that came from
// this directory.
// this directory and belong to the same project.
$project = $this->getWorkingCopyIdentity()->getProjectID();
$results = $conduit->callMethodSynchronous(
'differential.query',
$query);
$query + array(
'arcanistProjects' => $project,
));
foreach ($results as $key => $result) {
if ($result['sourcePath'] != $this->getPath()) {