Simplify jgit ProgressMonitor interface and fix TextProgressMonitor
commit845efd1ddcc071331aa05052ee2b6131b3906515
authorShawn O. Pearce <spearce@spearce.org>
Tue, 8 Apr 2008 05:10:46 +0000 (8 01:10 -0400)
committerShawn O. Pearce <spearce@spearce.org>
Tue, 8 Apr 2008 07:26:07 +0000 (8 03:26 -0400)
tree326abada51e15bded6e74337288cba8af6a38f78
parent6a4755a1340389edb7ca72adfcb829cfaca8c795
Simplify jgit ProgressMonitor interface and fix TextProgressMonitor

We don't need a big progress monitor interface like the one it
was patterned after.  All we really need is a way to tell the
implementation what we want to supply it, which is the start of a
task, a message describing it, and the work done.

The TextProgressMonitor no longer outputs thousands of lines with
500000% done while running IndexPack.  Instead we compute percent
complete and pad out the line nicely, and use CR to reset back to
the beginning of the line.  LF is used only to terminate the line
once progress output is complete.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
org.spearce.egit.ui/src/org/spearce/egit/ui/internal/wizards/GitCloneWizard.java
org.spearce.jgit/src/org/spearce/jgit/fetch/FetchClient.java
org.spearce.jgit/src/org/spearce/jgit/fetch/IndexPack.java
org.spearce.jgit/src/org/spearce/jgit/lib/AbstractProgressMonitor.java [deleted file]
org.spearce.jgit/src/org/spearce/jgit/lib/NullProgressMonitor.java
org.spearce.jgit/src/org/spearce/jgit/lib/ProgressMonitor.java
org.spearce.jgit/src/org/spearce/jgit/lib/TextProgressMonitor.java