Changeset View
Changeset View
Standalone View
Standalone View
src/differential/ArcanistDifferentialCommitMessage.php
Show First 20 Lines • Show All 133 Lines • ▼ Show 20 Lines | private function parseRevisionIDFromRawCorpus($corpus) { | ||||
$path = trim($path, '/'); | $path = trim($path, '/'); | ||||
if (preg_match($revision_pattern, $path, $match)) { | if (preg_match($revision_pattern, $path, $match)) { | ||||
return (int)$match[1]; | return (int)$match[1]; | ||||
} | } | ||||
throw new ArcanistUsageException( | throw new ArcanistUsageException( | ||||
pht( | pht( | ||||
'Invalid "Differential Revision" field in commit message. This field '. | 'Invalid "Differential Revision" field in commit message. This field '. | ||||
'should have a revision identifier like "%s" or a Phabricator URI '. | 'should have a revision identifier like "%s" or a server URI '. | ||||
'like "%s", but has "%s".', | 'like "%s", but has "%s".', | ||||
'D123', | 'D123', | ||||
'https://phabricator.example.com/D123', | 'https://devtools.example.com/D123', | ||||
$revision_value)); | $revision_value)); | ||||
} | } | ||||
} | } |