Mercurial > hg > mercurial
diff mercurial-common/src/jetbrains/buildServer/buildTriggers/vcs/mercurial/command/CloneCommand.java @ 883:39ff04730ccc
Report more vcs operation progress
Instead of setting progress in each operation, create HgRepo via
OpeationContext which adds progress to command settings.
author | Dmitry Neverov <dmitry.neverov@jetbrains.com> |
---|---|
date | Sun, 05 Oct 2014 11:15:34 +0200 |
parents | b130c7d27c02 |
children | 771ae1b2f0b1 |
line wrap: on
line diff
--- a/mercurial-common/src/jetbrains/buildServer/buildTriggers/vcs/mercurial/command/CloneCommand.java Sun Oct 05 09:32:01 2014 +0200 +++ b/mercurial-common/src/jetbrains/buildServer/buildTriggers/vcs/mercurial/command/CloneCommand.java Sun Oct 05 11:15:34 2014 +0200 @@ -29,7 +29,6 @@ private boolean myUsePullProtocol = true; private boolean myUseUncompressedTransfer = false; private boolean myTraceback; - private ProgressParser.ProgressConsumer myProgressConsumer; public CloneCommand(@NotNull CommandSettings commandSettings, @NotNull String hgPath, @@ -77,11 +76,6 @@ return this; } - public CloneCommand withProgressConsumer(ProgressParser.ProgressConsumer progressConsumer) { - myProgressConsumer = progressConsumer; - return this; - } - public void call() throws VcsException { myWorkingDir.mkdirs(); MercurialCommandLine cli = createCommandLine(); @@ -104,12 +98,11 @@ } CommandSettings settings = myCommandSettings.setTimeout(24 * 3600); // some repositories are quite large, we set timeout to 24 hours - if (myProgressConsumer != null) { + if (settings.getProgressConsumer() != null) { cli.addParameters("--config", "extensions.progress="); cli.addParameters("--config", "progress.format=topic number"); cli.addParameters("--config", "progress.delay=0"); cli.addParameters("--config", "progress.assume-tty=True"); - settings.setProgressConsumer(myProgressConsumer); } String repositoryUrl = myAuthSettings.getRepositoryUrlWithCredentials(myRepository);