Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15393110
D8526.id20230.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D8526.id20230.diff
View Options
diff --git a/src/applications/differential/customfield/DifferentialRevisionIDField.php b/src/applications/differential/customfield/DifferentialRevisionIDField.php
--- a/src/applications/differential/customfield/DifferentialRevisionIDField.php
+++ b/src/applications/differential/customfield/DifferentialRevisionIDField.php
@@ -3,6 +3,8 @@
final class DifferentialRevisionIDField
extends DifferentialCustomField {
+ private $revisionID;
+
public function getFieldKey() {
return 'differential:revision-id';
}
@@ -29,16 +31,20 @@
return true;
}
- public function shouldAllowEditInCommitMessage() {
- return false;
- }
-
public function parseValueFromCommitMessage($value) {
return self::parseRevisionIDFromURI($value);
}
public function renderCommitMessageValue(array $handles) {
- return PhabricatorEnv::getProductionURI('/D'.$this->getObject()->getID());
+ $id = coalesce($this->revisionID, $this->getObject()->getID());
+ if (!$id) {
+ return null;
+ }
+ return PhabricatorEnv::getProductionURI('/D'.$id);
+ }
+
+ public function readValueFromCommitMessage($value) {
+ $this->revisionID = $value;
}
private static function parseRevisionIDFromURI($uri) {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Mar 16, 7:44 PM (2 w, 4 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7223236
Default Alt Text
D8526.id20230.diff (1 KB)
Attached To
Mode
D8526: Fix "arc diff --verbatim" when updating a revision
Attached
Detach File
Event Timeline
Log In to Comment