From 3b65864ee110fe381ca9c4a427e3ef8536b1205b Mon Sep 17 00:00:00 2001 From: epriestley <git@epriestley.com> Date: Thu, 22 Dec 2011 06:57:04 -0800 Subject: [PATCH] Fix two minor bugs with recent patches: - Use the computed remote URI (which may have an explicit 'ssh://' under Git in some cases). - Use '$id' correctly rather than casting the URI to an int in the message parser. --- .../git/PhabricatorRepositoryGitCommitDiscoveryDaemon.php | 2 +- .../PhabricatorRepositoryDefaultCommitMessageDetailParser.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/applications/repository/daemon/commitdiscovery/git/PhabricatorRepositoryGitCommitDiscoveryDaemon.php b/src/applications/repository/daemon/commitdiscovery/git/PhabricatorRepositoryGitCommitDiscoveryDaemon.php index ea17c415e7..72e487086c 100644 --- a/src/applications/repository/daemon/commitdiscovery/git/PhabricatorRepositoryGitCommitDiscoveryDaemon.php +++ b/src/applications/repository/daemon/commitdiscovery/git/PhabricatorRepositoryGitCommitDiscoveryDaemon.php @@ -40,7 +40,7 @@ class PhabricatorRepositoryGitCommitDiscoveryDaemon } $remote = $matches[1]; - $expect = $repository->getDetail('remote-uri'); + $expect = $repository->getRemoteURI(); if ($remote != $expect) { $local_path = $repository->getLocalPath(); throw new Exception( diff --git a/src/applications/repository/parser/default/PhabricatorRepositoryDefaultCommitMessageDetailParser.php b/src/applications/repository/parser/default/PhabricatorRepositoryDefaultCommitMessageDetailParser.php index 6a6bd3424a..c8f36d686b 100644 --- a/src/applications/repository/parser/default/PhabricatorRepositoryDefaultCommitMessageDetailParser.php +++ b/src/applications/repository/parser/default/PhabricatorRepositoryDefaultCommitMessageDetailParser.php @@ -47,7 +47,7 @@ class PhabricatorRepositoryDefaultCommitMessageDetailParser $id = DifferentialRevisionIDFieldSpecification::parseRevisionIDFromURI( $match[1]); if ($id) { - $details['differential.revisionID'] = (int)$match[1]; + $details['differential.revisionID'] = $id; $revision = id(new DifferentialRevision())->load($id); if ($revision) { $details['differential.revisionPHID'] = $revision->getPHID();