Correct progress monitor on "Getting sizes:" phase

This counter always was running 1 higher, because it incremented
after the queue was exhausted (and every object was processed). Move
increments to be after the queue has provided a result, to ensure
we do not show a higher in-progress count than total count.

Change-Id: I97f815a0492c0957300475af409b6c6260008463
This commit is contained in:
Shawn O. Pearce 2011-11-17 07:21:22 -08:00
parent 4b84186b64
commit 29997ab084
1 changed files with 2 additions and 2 deletions

View File

@ -1041,12 +1041,11 @@ private void searchForDeltas(ProgressMonitor monitor)
try {
final long limit = config.getBigFileThreshold();
for (;;) {
monitor.update(1);
try {
if (!sizeQueue.next())
break;
} catch (MissingObjectException notFound) {
monitor.update(1);
if (ignoreMissingUninteresting) {
ObjectToPack otp = sizeQueue.getCurrent();
if (otp != null && otp.isEdge()) {
@ -1076,6 +1075,7 @@ else if (sz <= DeltaIndex.BLKSZ)
else
otp.setWeight((int) sz);
monitor.update(1);
}
} finally {
sizeQueue.release();