mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-11-26 00:32:41 +01:00
Drop support for parsing non-URL differential IDs from commit message.
Summary: This has been a `TODO` for a few years now... no-one should be using the old-school (non-URL) syntax anymore. Test Plan: I'm actually not sure if it's okay to drop support for this... please verify. Reviewers: epriestley, #blessed_reviewers Reviewed By: epriestley, #blessed_reviewers Subscribers: epriestley, Korvin Differential Revision: https://secure.phabricator.com/D9595
This commit is contained in:
parent
4c99a65567
commit
f2f5fb2508
1 changed files with 9 additions and 16 deletions
|
@ -19,16 +19,10 @@ final class ArcanistDifferentialCommitMessage {
|
|||
$obj = new ArcanistDifferentialCommitMessage();
|
||||
$obj->rawCorpus = $corpus;
|
||||
|
||||
// Parse older-style "123" fields, or newer-style full-URI fields.
|
||||
// TODO: Remove support for older-style fields.
|
||||
|
||||
$match = null;
|
||||
if (preg_match('/^Differential Revision:\s*(.*)/im', $corpus, $match)) {
|
||||
$revision_id = trim($match[1]);
|
||||
if (strlen($revision_id)) {
|
||||
if (preg_match('/^D?\d+$/', $revision_id)) {
|
||||
$obj->revisionID = (int)trim($revision_id, 'D');
|
||||
} else {
|
||||
$uri = new PhutilURI($revision_id);
|
||||
$path = $uri->getPath();
|
||||
$path = trim($path, '/');
|
||||
|
@ -42,7 +36,6 @@ final class ArcanistDifferentialCommitMessage {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$pattern = '/^git-svn-id:\s*([^@]+)@(\d+)\s+(.*)$/m';
|
||||
if (preg_match($pattern, $corpus, $match)) {
|
||||
|
|
Loading…
Reference in a new issue