Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14386748
D9091.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
8 KB
Referenced Files
None
Subscribers
None
D9091.diff
View Options
diff --git a/src/applications/diffusion/conduit/ConduitAPI_diffusion_readmequery_Method.php b/src/applications/diffusion/conduit/ConduitAPI_diffusion_readmequery_Method.php
--- a/src/applications/diffusion/conduit/ConduitAPI_diffusion_readmequery_Method.php
+++ b/src/applications/diffusion/conduit/ConduitAPI_diffusion_readmequery_Method.php
@@ -55,7 +55,7 @@
array(
'user' => $request->getUser(),
'repository' => $drequest->getRepository(),
- 'commit' => $drequest->getStableCommitName(),
+ 'commit' => $drequest->getStableCommit(),
'path' => $readme->getFullPath(),
));
@@ -65,7 +65,7 @@
$readme_request,
'diffusion.filecontentquery',
array(
- 'commit' => $drequest->getStableCommitName(),
+ 'commit' => $drequest->getStableCommit(),
'path' => $readme->getFullPath(),
'needsBlame' => false,
)));
diff --git a/src/applications/diffusion/conduit/ConduitAPI_diffusion_searchquery_Method.php b/src/applications/diffusion/conduit/ConduitAPI_diffusion_searchquery_Method.php
--- a/src/applications/diffusion/conduit/ConduitAPI_diffusion_searchquery_Method.php
+++ b/src/applications/diffusion/conduit/ConduitAPI_diffusion_searchquery_Method.php
@@ -17,7 +17,7 @@
protected function defineCustomParamTypes() {
return array(
'path' => 'required string',
- 'stableCommitName' => 'required string',
+ 'commit' => 'optional string',
'grep' => 'required string',
'limit' => 'optional int',
'offset' => 'optional int',
@@ -46,7 +46,6 @@
protected function getGitResult(ConduitAPIRequest $request) {
$drequest = $this->getDiffusionRequest();
$path = $drequest->getPath();
- $stable_commit_name = $request->getValue('stableCommitName');
$grep = $request->getValue('grep');
$repository = $drequest->getRepository();
$limit = $request->getValue('limit');
@@ -57,7 +56,7 @@
// NOTE: --perl-regexp is available only with libpcre compiled in.
'grep --extended-regexp --null -n --no-color -e %s %s -- %s',
$grep,
- $stable_commit_name,
+ $drequest->getStableCommit(),
$path);
$binary_pattern = '/Binary file [^:]*:(.+) matches/';
@@ -84,7 +83,6 @@
protected function getMercurialResult(ConduitAPIRequest $request) {
$drequest = $this->getDiffusionRequest();
$path = $drequest->getPath();
- $stable_commit_name = $request->getValue('stableCommitName');
$grep = $request->getValue('grep');
$repository = $drequest->getRepository();
$limit = $request->getValue('limit');
@@ -93,7 +91,7 @@
$results = array();
$future = $repository->getLocalCommandFuture(
'grep --rev %s --print0 --line-number %s %s',
- hgsprintf('ancestors(%s)', $stable_commit_name),
+ hgsprintf('ancestors(%s)', $drequest->getStableCommit()),
$grep,
$path);
diff --git a/src/applications/diffusion/controller/DiffusionBrowseController.php b/src/applications/diffusion/controller/DiffusionBrowseController.php
--- a/src/applications/diffusion/controller/DiffusionBrowseController.php
+++ b/src/applications/diffusion/controller/DiffusionBrowseController.php
@@ -141,7 +141,7 @@
->setUser($viewer)
->setActionList($actions);
- $stable_commit = $drequest->getStableCommitName();
+ $stable_commit = $drequest->getStableCommit();
$callsign = $drequest->getRepository()->getCallsign();
$view->addProperty(
diff --git a/src/applications/diffusion/controller/DiffusionBrowseMainController.php b/src/applications/diffusion/controller/DiffusionBrowseMainController.php
--- a/src/applications/diffusion/controller/DiffusionBrowseMainController.php
+++ b/src/applications/diffusion/controller/DiffusionBrowseMainController.php
@@ -19,7 +19,7 @@
'diffusion.browsequery',
array(
'path' => $drequest->getPath(),
- 'commit' => $drequest->getStableCommitName(),
+ 'commit' => $drequest->getStableCommit(),
)));
$reason = $results->getReasonForEmptyResultSet();
$is_file = ($reason == DiffusionBrowseResultSet::REASON_IS_FILE);
diff --git a/src/applications/diffusion/controller/DiffusionBrowseSearchController.php b/src/applications/diffusion/controller/DiffusionBrowseSearchController.php
--- a/src/applications/diffusion/controller/DiffusionBrowseSearchController.php
+++ b/src/applications/diffusion/controller/DiffusionBrowseSearchController.php
@@ -61,7 +61,7 @@
'diffusion.searchquery',
array(
'grep' => $query_string,
- 'stableCommitName' => $drequest->getStableCommitName(),
+ 'commit' => $drequest->getStableCommit(),
'path' => $drequest->getPath(),
'limit' => $limit + 1,
'offset' => $page,
@@ -73,7 +73,7 @@
'diffusion.querypaths',
array(
'pattern' => $query_string,
- 'commit' => $drequest->getStableCommitName(),
+ 'commit' => $drequest->getStableCommit(),
'path' => $drequest->getPath(),
'limit' => $limit + 1,
'offset' => $page,
diff --git a/src/applications/diffusion/controller/DiffusionChangeController.php b/src/applications/diffusion/controller/DiffusionChangeController.php
--- a/src/applications/diffusion/controller/DiffusionChangeController.php
+++ b/src/applications/diffusion/controller/DiffusionChangeController.php
@@ -139,7 +139,7 @@
->setUser($viewer)
->setActionList($actions);
- $stable_commit = $drequest->getStableCommitName();
+ $stable_commit = $drequest->getStableCommit();
$callsign = $drequest->getRepository()->getCallsign();
$view->addProperty(
diff --git a/src/applications/diffusion/controller/DiffusionHistoryController.php b/src/applications/diffusion/controller/DiffusionHistoryController.php
--- a/src/applications/diffusion/controller/DiffusionHistoryController.php
+++ b/src/applications/diffusion/controller/DiffusionHistoryController.php
@@ -152,7 +152,7 @@
->setUser($viewer)
->setActionList($actions);
- $stable_commit = $drequest->getStableCommitName();
+ $stable_commit = $drequest->getStableCommit();
$callsign = $drequest->getRepository()->getCallsign();
$view->addProperty(
diff --git a/src/applications/diffusion/request/DiffusionRequest.php b/src/applications/diffusion/request/DiffusionRequest.php
--- a/src/applications/diffusion/request/DiffusionRequest.php
+++ b/src/applications/diffusion/request/DiffusionRequest.php
@@ -15,16 +15,17 @@
protected $callsign;
protected $path;
protected $line;
- protected $symbolicCommit;
protected $commit;
protected $commitType = 'commit';
protected $branch;
protected $lint;
+ protected $symbolicCommit;
+ protected $stableCommit;
+
protected $repository;
protected $repositoryCommit;
protected $repositoryCommitData;
- protected $stableCommitName;
protected $arcanistProjects;
private $initFromConduit = true;
@@ -315,11 +316,11 @@
* @return string Stable commit name, like a git hash or SVN revision. Not
* a symbolic commit reference.
*/
- public function getStableCommitName() {
- if (!$this->stableCommitName) {
- $this->queryStableCommitName();
+ public function getStableCommit() {
+ if (!$this->stableCommit) {
+ $this->queryStableCommit();
}
- return $this->stableCommitName;
+ return $this->stableCommit;
}
final public function getRawCommit() {
@@ -347,7 +348,7 @@
if (empty($params['stable'])) {
$default_commit = $this->getRawCommit();
} else {
- $default_commit = $this->getStableCommitName();
+ $default_commit = $this->getStableCommit();
}
$defaults = array(
@@ -636,10 +637,10 @@
return $this->commitType;
}
- private function queryStableCommitName() {
+ private function queryStableCommit() {
if ($this->commit) {
- $this->stableCommitName = $this->commit;
- return $this->stableCommitName;
+ $this->stableCommit = $this->commit;
+ return $this->stableCommit;
}
if ($this->getSupportsBranches()) {
@@ -656,8 +657,8 @@
pht('Ref "%s" is ambiguous or does not exist.', $branch));
}
- $this->stableCommitName = idx(head($matches), 'identifier');
- return $this->stableCommitName;
+ $this->stableCommit = idx(head($matches), 'identifier');
+ return $this->stableCommit;
}
protected function getResolvableBranchName($branch) {
diff --git a/src/applications/diffusion/request/DiffusionSvnRequest.php b/src/applications/diffusion/request/DiffusionSvnRequest.php
--- a/src/applications/diffusion/request/DiffusionSvnRequest.php
+++ b/src/applications/diffusion/request/DiffusionSvnRequest.php
@@ -27,7 +27,7 @@
return $this->commit;
}
- return $this->getStableCommitName();
+ return $this->getStableCommit();
}
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Dec 22, 2:01 PM (10 h, 6 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6918454
Default Alt Text
D9091.diff (8 KB)
Attached To
Mode
D9091: Rename "stableCommitName" to "stableCommit"
Attached
Detach File
Event Timeline
Log In to Comment