Mercurial > jhg
diff cmdline/org/tmatesoft/hg/console/Log.java @ 215:41a778e3fd31
Issue 5: Facilities for progress and cancellation. More specific exceptions. Exceptions from callbacks as RuntimeException
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Tue, 17 May 2011 00:56:54 +0200 |
parents | 63c9fed4369e |
children | 4c3b9f679412 |
line wrap: on
line diff
--- a/cmdline/org/tmatesoft/hg/console/Log.java Mon May 16 21:10:36 2011 +0200 +++ b/cmdline/org/tmatesoft/hg/console/Log.java Tue May 17 00:56:54 2011 +0200 @@ -22,6 +22,8 @@ import org.tmatesoft.hg.core.HgLogCommand.FileRevision; import org.tmatesoft.hg.repo.HgDataFile; import org.tmatesoft.hg.repo.HgRepository; +import org.tmatesoft.hg.util.CancelSupport; +import org.tmatesoft.hg.util.ProgressSupport; /** @@ -39,6 +41,11 @@ System.err.printf("Can't find repository in: %s\n", hgRepo.getLocation()); return; } + // + // in fact, neither cancel nor progress of any use, need them just to check comamnd API + final CancelSupport noCancel = CancelSupport.Factory.get(null); + final ProgressSupport noProgress = ProgressSupport.Factory.get(null); + // final Dump dump = new Dump(hgRepo); dump.complete(cmdLineOpts.getBoolean("--debug")); dump.verbose(cmdLineOpts.getBoolean("-v", "--verbose")); @@ -55,6 +62,7 @@ if (limit != -1) { cmd.limit(limit); } + cmd.set(noCancel).set(noProgress); List<String> files = cmdLineOpts.getList(""); final long start = System.currentTimeMillis(); if (files.isEmpty()) {