From 2bc358dd9855562c586c5e2992f6bc50518d6b9d Mon Sep 17 00:00:00 2001 From: Kirill Likhodedov Date: Mon, 13 Dec 2010 15:31:44 +0300 Subject: [PATCH] Git logging: log commands as in Version Control console; real git command line when notifying about start failure. --- plugins/git4idea/src/git4idea/commands/GitHandler.java | 4 +--- .../git4idea/src/git4idea/commands/GitSimpleHandler.java | 6 +++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/plugins/git4idea/src/git4idea/commands/GitHandler.java b/plugins/git4idea/src/git4idea/commands/GitHandler.java index fa7f28ede7c0..6b7b8d1d7002 100644 --- a/plugins/git4idea/src/git4idea/commands/GitHandler.java +++ b/plugins/git4idea/src/git4idea/commands/GitHandler.java @@ -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(); diff --git a/plugins/git4idea/src/git4idea/commands/GitSimpleHandler.java b/plugins/git4idea/src/git4idea/commands/GitSimpleHandler.java index f2b210b41c28..988e1326ee09 100644 --- a/plugins/git4idea/src/git4idea/commands/GitSimpleHandler.java +++ b/plugins/git4idea/src/git4idea/commands/GitSimpleHandler.java @@ -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]; }