/**
* Get the PHID of the Phabricator repository this working copy corresponds
- * to. Returns `null` no repository can be identified.
+ * to. Returns `null` if no repository can be identified.
*
* @return phid|null Repository PHID, or null if no repository can be
* identified.
/**
* Get the callsign of the Phabricator repository this working copy
- * corresponds to. Returns `null` no repository can be identified.
+ * corresponds to. Returns `null` if no repository can be identified.
*
* @return string|null Repository callsign, or null if no repository can be
* identified.
}
+ /**
+ * Get the URI of the Phabricator repository this working copy
+ * corresponds to. Returns `null` if no repository can be identified.
+ *
+ * @return string|null Repository URI, or null if no repository can be
+ * identified.
+ *
+ * @task phabrep
+ */
+ protected function getRepositoryURI() {
+ return idx($this->getRepositoryInformation(), 'uri');
+ }
+
+
/**
* Get human-readable reasoning explaining how `arc` evaluated which
* Phabricator repository corresponds to this working copy. Used by
}
private function getBaseURI() {
- $conduit = $this->getConduit();
- $project_id = $this->getWorkingCopy()->getProjectID();
- $project_info = $this->getConduit()->callMethodSynchronous(
- 'arcanist.projectinfo',
- array(
- 'name' => $project_id,
- ));
-
- $repo_info = $project_info['repository'];
+ $repo_uri = $this->getRepositoryURI();
$branch = $this->getArgument('branch', 'master');
- return $repo_info['uri'].'browse/'.$branch.'/';
+ return $repo_uri.'browse/'.$branch.'/';
}
private function getBrowserCommand() {