Git logging: log commands as in Version Control console; real git command line when notifying about start failure.

This commit is contained in:
Kirill Likhodedov
2010-12-13 20:08:46 +03:00
parent 5626722ca3
commit 2bc358dd98
2 changed files with 4 additions and 6 deletions
@@ -384,9 +384,7 @@ public abstract class GitHandler {
if (!myProject.isDefault() && !mySilent && (myVcs != null)) {
myVcs.showCommandLine("cd " + myWorkingDirectory);
myVcs.showCommandLine(printableCommandLine());
}
if (LOG.isDebugEnabled()) {
LOG.debug("running git: " + myCommandLine.getCommandLineString() + " in " + myWorkingDirectory);
LOG.info(myCommandLine.getCommandLineString());
}
if (!myNoSSHFlag && myProjectSettings.isIdeaSsh()) {
GitSSHService ssh = GitSSHIdeaService.getInstance();
@@ -218,7 +218,7 @@ public class GitSimpleHandler extends GitTextHandler {
}
public void startFailed(final Throwable exception) {
ex[0] = new VcsException("Process failed to start (" + printableCommandLine() + "): " + exception.toString(), exception);
ex[0] = new VcsException("Process failed to start (" + myCommandLine.getCommandLineString() + "): " + exception.toString(), exception);
sem.release();
}
});
@@ -227,13 +227,13 @@ public class GitSimpleHandler extends GitTextHandler {
sem.acquire();
}
catch (InterruptedException e) {
throw new VcsException("The git process is interrupted: " + printableCommandLine(), e);
throw new VcsException("The git process is interrupted: " + myCommandLine.getCommandLineString(), e);
}
if (ex[0] != null) {
throw ex[0];
}
if (result[0] == null) {
throw new VcsException("The git command returned null: " + printableCommandLine());
throw new VcsException("The git command returned null: " + myCommandLine.getCommandLineString());
}
return result[0];
}