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
}
// 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;
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()) {