Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15331659
D8173.id18489.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D8173.id18489.diff
View Options
Index: src/workflow/ArcanistBaseWorkflow.php
===================================================================
--- src/workflow/ArcanistBaseWorkflow.php
+++ src/workflow/ArcanistBaseWorkflow.php
@@ -1527,7 +1527,7 @@
/**
* 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.
@@ -1541,7 +1541,7 @@
/**
* 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.
@@ -1554,6 +1554,20 @@
/**
+ * 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
* `arc which` to explain the process to users.
Index: src/workflow/ArcanistBrowseWorkflow.php
===================================================================
--- src/workflow/ArcanistBrowseWorkflow.php
+++ src/workflow/ArcanistBrowseWorkflow.php
@@ -108,18 +108,10 @@
}
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() {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Mar 8, 12:27 PM (1 d, 18 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7382315
Default Alt Text
D8173.id18489.diff (2 KB)
Attached To
Mode
D8173: Detect repo for 'browse'; don't require project ID
Attached
Detach File
Event Timeline
Log In to Comment