Diffusion - move merged commits query to happen over conduit.

Summary: Ref T2784. Also sneaks in a fix for branch query -- forgot to catch the unsupported VCS exception. One strange thing is I have test Phabricator repositories and the mercurial one is showing different data than git for the same commit. The data shown is consistent pre and post this diff though so its an existing issue. Also note the mercurial is an import of git so maybe its busted-ish?

Test Plan: viewed commits in mercurial, svn, and git that were merge commits. saw the right stuff in mercurial and git.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T2784

Differential Revision: https://secure.phabricator.com/D5985
This commit is contained in:
Bob Trahan
2013-05-20 17:04:51 -07:00
parent 9b5f0aa03a
commit 5d495ebbad
8 changed files with 131 additions and 137 deletions

View File

@@ -10,9 +10,16 @@ final class DiffusionCommitBranchesController extends DiffusionController {
public function processRequest() {
$request = $this->getDiffusionRequest();
$branches = $this->callConduitWithDiffusionRequest(
'diffusion.commitbranchesquery',
array('commit' => $request->getCommit()));
$branches = array();
try {
$branches = $this->callConduitWithDiffusionRequest(
'diffusion.commitbranchesquery',
array('commit' => $request->getCommit()));
} catch (ConduitException $ex) {
if ($ex->getMessage() != 'ERR-UNSUPPORTED-VCS') {
throw $ex;
}
}
$branch_links = array();
foreach ($branches as $branch => $commit) {