From 8f63dface2e08b228cdeb3bef3f93458eab9ce14 Mon Sep 17 00:00:00 2001 From: "Shawn O. Pearce" Date: Mon, 31 Jan 2011 08:37:54 -0800 Subject: [PATCH] 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 Signed-off-by: Chris Aniszczyk --- org.eclipse.jgit/resources/org/eclipse/jgit/JGitText.properties | 1 + org.eclipse.jgit/src/org/eclipse/jgit/JGitText.java | 1 + .../src/org/eclipse/jgit/storage/pack/PackWriter.java | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/org.eclipse.jgit/resources/org/eclipse/jgit/JGitText.properties b/org.eclipse.jgit/resources/org/eclipse/jgit/JGitText.properties index 2f480194a..9b1cb0c91 100644 --- a/org.eclipse.jgit/resources/org/eclipse/jgit/JGitText.properties +++ b/org.eclipse.jgit/resources/org/eclipse/jgit/JGitText.properties @@ -380,6 +380,7 @@ resettingHead=Resetting head to {0} resultLengthIncorrect=result length incorrect rewinding=Rewinding to commit {0} searchForReuse=Finding sources +searchForSizes=Getting sizes sequenceTooLargeForDiffAlgorithm=Sequence too large for difference algorithm. serviceNotPermitted={0} not permitted shortCompressedStreamAt=Short compressed stream at {0} diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/JGitText.java b/org.eclipse.jgit/src/org/eclipse/jgit/JGitText.java index 71fa26de4..bd63a42db 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/JGitText.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/JGitText.java @@ -440,6 +440,7 @@ public class JGitText extends TranslationBundle { /***/ public String resultLengthIncorrect; /***/ public String rewinding; /***/ public String searchForReuse; + /***/ public String searchForSizes; /***/ public String sequenceTooLargeForDiffAlgorithm; /***/ public String serviceNotPermitted; /***/ public String shortCompressedStreamAt; diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java b/org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java index 9a586683a..fb15a5c59 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java +++ b/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 // abort with an exception if we actually had to have it. // - monitor.beginTask(JGitText.get().compressingObjects, cnt); + monitor.beginTask(JGitText.get().searchForSizes, cnt); AsyncObjectSizeQueue sizeQueue = reader.getObjectSize( Arrays. asList(list).subList(0, cnt), false); try {