Page MenuHomePhabricator

D12749.diff
No OneTemporary

D12749.diff

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
@@ -32,6 +32,14 @@
}
public function parseValueFromCommitMessage($value) {
+ // If the value is just "D123" or similar, parse the ID from it directly.
+ $value = trim($value);
+ $matches = null;
+ if (preg_match('/^[dD]([1-9]\d*)\z/', $value, $matches)) {
+ return (int)$matches[1];
+ }
+
+ // Otherwise, try to extract a URI value.
return self::parseRevisionIDFromURI($value);
}

File Metadata

Mime Type
text/plain
Expires
Sat, Apr 26, 1:30 PM (2 h, 43 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7706905
Default Alt Text
D12749.diff (745 B)

Event Timeline