comparison mercurial-common/src/jetbrains/buildServer/buildTriggers/vcs/mercurial/command/BaseCommand.java @ 338:d31d7c81b637 Eluru-6.5.x

Support subrepositories while building clean patch. Use 'hg clone' instead of 'hg archive' if repository contains subrepositories.
author Dmitry Neverov <dmitry.neverov@jetbrains.com>
date Fri, 02 Dec 2011 15:12:49 +0300
parents f5092b982bdb
children b799355b4016 e8f0eb6d4ca4
comparison
equal deleted inserted replaced
336:e9aaa453b880 338:d31d7c81b637
82 return StringUtil.escapeQuotesIfWindows(s); 82 return StringUtil.escapeQuotesIfWindows(s);
83 } 83 }
84 } 84 }
85 85
86 /** 86 /**
87 * Since mercurial 1.7 on Windows the only file inside '<mercurial_install_dir>/bin' is 'hg.cmd' 87 * Since mercurial 1.7 on Windows the only file inside '<mercurial_install_dir>/bin' is 'hg.cmd'
88 * which run hg.exe placed in the parent dir. GeneralCommandLine will not find hg.cmd, in the 88 * which run hg.exe placed in the parent dir. GeneralCommandLine will not find hg.cmd, in the
89 * case when $PATH contains <mercurial_install_dir>/bin and doesn't contain <mercurial_install_dir> 89 * case when $PATH contains <mercurial_install_dir>/bin and doesn't contain <mercurial_install_dir>
90 * and hg executable is set to 'hg'. To fix it - run hg using windows shell which expand 90 * and hg executable is set to 'hg'. To fix it - run hg using windows shell which expand
91 * hg to hg.cmd correctly. 91 * hg to hg.cmd correctly.
92 */ 92 */
93 private void setupExecutable(GeneralCommandLine cli) { 93 private void setupExecutable(GeneralCommandLine cli) {
94 if (SystemInfo.isWindows && getSettings().getHgCommandPath().equals("hg")) { 94 if (SystemInfo.isWindows && getSettings().getHgCommandPath().equals("hg")) {
110 110
111 protected ExecResult runCommand(@NotNull GeneralCommandLine cli) throws VcsException { 111 protected ExecResult runCommand(@NotNull GeneralCommandLine cli) throws VcsException {
112 return CommandUtil.runCommand(cli, getPrivateData()); 112 return CommandUtil.runCommand(cli, getPrivateData());
113 } 113 }
114 114
115 protected ExecResult runCommand(@NotNull GeneralCommandLine cli, boolean logErrorsInDebug) throws VcsException {
116 return CommandUtil.runCommand(cli, CommandUtil.DEFAULT_COMMAND_TIMEOUT_SEC, getPrivateData(), logErrorsInDebug);
117 }
118
115 protected ExecResult runCommand(@NotNull GeneralCommandLine cli, int executionTimeout) throws VcsException { 119 protected ExecResult runCommand(@NotNull GeneralCommandLine cli, int executionTimeout) throws VcsException {
116 return CommandUtil.runCommand(cli, executionTimeout, getPrivateData()); 120 return CommandUtil.runCommand(cli, executionTimeout, getPrivateData());
117 } 121 }
118 122
119 protected void failIfNotEmptyStdErr(@NotNull GeneralCommandLine cli, @NotNull ExecResult res) throws VcsException { 123 protected void failIfNotEmptyStdErr(@NotNull GeneralCommandLine cli, @NotNull ExecResult res) throws VcsException {