Changeset View
Changeset View
Standalone View
Standalone View
src/toolset/workflow/ArcanistVersionWorkflow.php
Show First 20 Lines • Show All 61 Lines • ▼ Show 20 Lines | foreach ($roots as $lib => $root) { | ||||
throw new PhutilArgumentUsageException( | throw new PhutilArgumentUsageException( | ||||
pht( | pht( | ||||
'Library "%s" (at "%s") is not a Git working copy, so no version '. | 'Library "%s" (at "%s") is not a Git working copy, so no version '. | ||||
'information can be provided.', | 'information can be provided.', | ||||
$lib, | $lib, | ||||
Filesystem::readablePath($root))); | Filesystem::readablePath($root))); | ||||
} | } | ||||
// NOTE: Carefully execute these commands in a way that works on Windows | list($commit) = $repository_api->execxLocal( | ||||
// until T8298 is properly fixed. See PHI52. | 'log -1 --format=%s', | ||||
'%ct%x01%H'); | |||||
list($commit) = $repository_api->execxLocal('log -1 --format=%%H'); | |||||
$commit = trim($commit); | $commit = trim($commit); | ||||
list($timestamp) = $repository_api->execxLocal('log -1 --format=%%ct'); | list($timestamp, $commit) = explode("\1", $commit); | ||||
$timestamp = trim($timestamp); | |||||
$console->writeOut( | $console->writeOut( | ||||
"%s %s (%s)\n", | "%s %s (%s)\n", | ||||
$lib, | $lib, | ||||
$commit, | $commit, | ||||
date('j M Y', (int)$timestamp)); | date('j M Y', (int)$timestamp)); | ||||
} | } | ||||
} | } | ||||
} | } |