# HG changeset patch # User eugene.petrenko@jetbrains.com # Date 1388756224 -3600 # Node ID fbff229ee2dc1879789a133fe60305a325a56de4 # Parent 68251dea7eae41bd6e82dc79a150d79ca3a08178 add 'files' for log command diff -r 68251dea7eae -r fbff229ee2dc mercurial-common/src/jetbrains/buildServer/buildTriggers/vcs/mercurial/command/LogCommand.java --- a/mercurial-common/src/jetbrains/buildServer/buildTriggers/vcs/mercurial/command/LogCommand.java Fri Jan 03 14:04:09 2014 +0100 +++ b/mercurial-common/src/jetbrains/buildServer/buildTriggers/vcs/mercurial/command/LogCommand.java Fri Jan 03 14:37:04 2014 +0100 @@ -28,10 +28,7 @@ import java.io.File; import java.io.IOException; import java.nio.charset.Charset; -import java.util.Collections; -import java.util.HashMap; -import java.util.List; -import java.util.Map; +import java.util.*; public class LogCommand extends VcsRootCommand { @@ -47,6 +44,7 @@ private boolean myCalculateParents = true; private String myRevsets; private File myTemplate; + private List myFiles = new ArrayList(); public LogCommand(@NotNull CommandSettings commandSettings, @NotNull String hgPath, @@ -100,6 +98,11 @@ return this; } + public LogCommand forFile(@NotNull final String file) { + myFiles.add(file); + return this; + } + public List call() throws VcsException { MercurialCommandLine cli = createCommandLine(); cli.setCharset(Charset.forName("UTF-8")); @@ -125,6 +128,8 @@ cli.addParameter(myLimit.toString()); } + cli.addParameters(myFiles); + CommandResult res = runCommand(cli); String output = res.getStdout(); try {