From c76c5d893e36f1f4b7bba1b00bb4a1b5b38c0c54 Mon Sep 17 00:00:00 2001 From: Joshua Spence Date: Fri, 30 Jan 2015 07:15:05 +1100 Subject: [PATCH] Minor tidying of `ArcanistVersionWorkflow` Summary: Self-explanatory. Test Plan: Eyeball it. Reviewers: epriestley, #blessed_reviewers Reviewed By: epriestley, #blessed_reviewers Subscribers: Korvin, epriestley Differential Revision: https://secure.phabricator.com/D11553 --- src/workflow/ArcanistVersionWorkflow.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/workflow/ArcanistVersionWorkflow.php b/src/workflow/ArcanistVersionWorkflow.php index b0674512..ea27eaff 100644 --- a/src/workflow/ArcanistVersionWorkflow.php +++ b/src/workflow/ArcanistVersionWorkflow.php @@ -29,7 +29,9 @@ EOTEXT if (!Filesystem::binaryExists('git')) { throw new ArcanistUsageException( - 'Cannot display current version without having `git` installed.'); + pht( + 'Cannot display current version without having `%s` installed.', + 'git')); } $roots = array( @@ -45,13 +47,17 @@ EOTEXT $configuration_manager); if (!Filesystem::pathExists($repository->getMetadataPath())) { - throw new ArcanistUsageException("{$lib} is not a git working copy."); + throw new ArcanistUsageException( + pht( + '%s is not a git working copy.', + $lib)); } list($stdout) = $repository->execxLocal('log -1 --format=%s', '%H %ct'); list($commit, $timestamp) = explode(' ', $stdout); - $console->writeOut("%s %s (%s)\n", + $console->writeOut( + "%s %s (%s)\n", $lib, $commit, date('j M Y', (int)$timestamp));