Browse Source

PackWriter: Correct 'Compressing objects' progress message

The first 'Compressing objects' progress message is wrong, its
actually PackWriter looking up the sizes of each object in the
ObjectDatabase, so objects can be sorted correctly in the later
type-size sort that tries to take advantage of "Linus' Law" to
improve delta compression.

Rename the progress to say 'Getting sizes', which is an accurate
description of what it is doing.

Change-Id: Ida0a052ad2f6e994996189ca12959caab9e556a3
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Chris Aniszczyk <caniszczyk@gmail.com>
stable-0.11
Shawn O. Pearce 14 years ago committed by Chris Aniszczyk
parent
commit
8f63dface2
  1. 1
      org.eclipse.jgit/resources/org/eclipse/jgit/JGitText.properties
  2. 1
      org.eclipse.jgit/src/org/eclipse/jgit/JGitText.java
  3. 2
      org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java

1
org.eclipse.jgit/resources/org/eclipse/jgit/JGitText.properties

@ -380,6 +380,7 @@ resettingHead=Resetting head to {0}
resultLengthIncorrect=result length incorrect resultLengthIncorrect=result length incorrect
rewinding=Rewinding to commit {0} rewinding=Rewinding to commit {0}
searchForReuse=Finding sources searchForReuse=Finding sources
searchForSizes=Getting sizes
sequenceTooLargeForDiffAlgorithm=Sequence too large for difference algorithm. sequenceTooLargeForDiffAlgorithm=Sequence too large for difference algorithm.
serviceNotPermitted={0} not permitted serviceNotPermitted={0} not permitted
shortCompressedStreamAt=Short compressed stream at {0} shortCompressedStreamAt=Short compressed stream at {0}

1
org.eclipse.jgit/src/org/eclipse/jgit/JGitText.java

@ -440,6 +440,7 @@ public class JGitText extends TranslationBundle {
/***/ public String resultLengthIncorrect; /***/ public String resultLengthIncorrect;
/***/ public String rewinding; /***/ public String rewinding;
/***/ public String searchForReuse; /***/ public String searchForReuse;
/***/ public String searchForSizes;
/***/ public String sequenceTooLargeForDiffAlgorithm; /***/ public String sequenceTooLargeForDiffAlgorithm;
/***/ public String serviceNotPermitted; /***/ public String serviceNotPermitted;
/***/ public String shortCompressedStreamAt; /***/ public String shortCompressedStreamAt;

2
org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java

@ -557,7 +557,7 @@ public class PackWriter {
// search code to discover the missing object and skip over it, or // search code to discover the missing object and skip over it, or
// abort with an exception if we actually had to have it. // abort with an exception if we actually had to have it.
// //
monitor.beginTask(JGitText.get().compressingObjects, cnt); monitor.beginTask(JGitText.get().searchForSizes, cnt);
AsyncObjectSizeQueue<ObjectToPack> sizeQueue = reader.getObjectSize( AsyncObjectSizeQueue<ObjectToPack> sizeQueue = reader.getObjectSize(
Arrays.<ObjectToPack> asList(list).subList(0, cnt), false); Arrays.<ObjectToPack> asList(list).subList(0, cnt), false);
try { try {

Loading…
Cancel
Save