Skip to content

Commit 6f806bd

Browse files
committedSep 8, 2014
Use PhutilConsoleProgressBar for the repository/reparse.php script
Summary: The output from this script is too verbose... all that I care about is the overall progress. Test Plan: Ran the script on a large repository. ```lang=bash ./scripts/repository/reparse.php --all XYZ --message NOTE: This script will queue tasks to reparse the data. Once the tasks have been queued, you need to run Taskmaster daemons to execute them. QUEUEING TASKS (92,969 Commits): [ ] 0.1% ``` Reviewers: #blessed_reviewers, epriestley Reviewed By: #blessed_reviewers, epriestley Subscribers: epriestley, Korvin Differential Revision: https://secure.phabricator.com/D10441
1 parent ee6afcc commit 6f806bd

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed
 

‎scripts/repository/reparse.php

+6-5
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,9 @@
218218
echo "QUEUEING TASKS (".number_format(count($commits))." Commits):\n";
219219
}
220220

221+
$progress = new PhutilConsoleProgressBar();
222+
$progress->setTotal(count($commits));
223+
221224
$tasks = array();
222225
foreach ($commits as $commit) {
223226
$classes = array();
@@ -271,20 +274,18 @@
271274
$class,
272275
$spec,
273276
PhabricatorWorker::PRIORITY_IMPORT);
274-
275-
$commit_name = 'r'.$callsign.$commit->getCommitIdentifier();
276-
echo " Queued '{$class}' for commit '{$commit_name}'.\n";
277277
}
278278
} else {
279279
foreach ($classes as $class) {
280280
$worker = newv($class, array($spec));
281-
echo "Running '{$class}'...\n";
282281
$worker->executeTask();
283282
}
284283
}
284+
285+
$progress->update(1);
285286
}
286287

287-
echo "\nDone.\n";
288+
$progress->done();
288289

289290
function usage($message) {
290291
echo phutil_console_format(

0 commit comments

Comments
 (0)
Failed to load comments.