From b960c8114b50889f248624485165c9f6e3278281 Mon Sep 17 00:00:00 2001 From: John Mullanaphy Date: Thu, 9 Jan 2014 10:35:31 -0800 Subject: [PATCH] Changed \$callsign to \$argv[1] on commit_hook.php since is undefined causing an error when trying to report an error. Summary: Phabricator was going to give me an error message via commit_hook.php, unfortunately said error wasn't being set since \$callsign was undefined. So, just changed \$callsign to \$argv[1] and now I get the appropriate commit. Test Plan: 1. Add commit_hook.php to an SVN pre-commit. 2. Set the SVN to be hosted off of Phabricator. 3. Attempt to commit to commit to SVN repository. Expected: Error message saying that the repository isn't hosted on Phabricator Results: Error message saying undefined function. Reviewers: epriestley, #blessed_reviewers Reviewed By: epriestley CC: Korvin, epriestley, aran Differential Revision: https://secure.phabricator.com/D7920 --- scripts/repository/commit_hook.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/repository/commit_hook.php b/scripts/repository/commit_hook.php index 77a3653c58..2c7fe4289b 100755 --- a/scripts/repository/commit_hook.php +++ b/scripts/repository/commit_hook.php @@ -17,12 +17,12 @@ $repository = id(new PhabricatorRepositoryQuery()) ->executeOne(); if (!$repository) { - throw new Exception(pht('No such repository "%s"!', $callsign)); + throw new Exception(pht('No such repository "%s"!', $argv[1])); } if (!$repository->isHosted()) { // This should be redundant, but double check just in case. - throw new Exception(pht('Repository "%s" is not hosted!', $callsign)); + throw new Exception(pht('Repository "%s" is not hosted!', $argv[1])); } $engine->setRepository($repository);