VCS: Show message box on timeouts/Add SSH prompt.

- Use message boxes on timeouts.
- Add a configuration for a graphical SSH password prompt binary with
defaults
- Launch commands that require authentification with no terminal on UNIX
and environment variable SSH_ASKPASS set accordingly.
- First attempt at introduce a common function to synchronously run VCS
commands in base plugin with flags.
- Use standard execution log entries in all VCS plugins (outputwindow).
This commit is contained in:
Friedemann Kleint
2010-05-21 17:46:00 +02:00
parent 91c4b0305c
commit 5364f5c152
26 changed files with 535 additions and 313 deletions

View File

@@ -30,20 +30,19 @@
#include "subversionsettings.h"
#include <QtCore/QSettings>
#include <QtCore/QTextStream>
static const char *groupC = "Subversion";
static const char *commandKeyC = "Command";
static const char *userKeyC = "User";
static const char *passwordKeyC = "Password";
static const char *authenticationKeyC = "Authentication";
static const char groupC[] = "Subversion";
static const char commandKeyC[] = "Command";
static const char userKeyC[] = "User";
static const char passwordKeyC[] = "Password";
static const char authenticationKeyC[] = "Authentication";
static const char *userNameOptionC = "--username";
static const char *passwordOptionC = "--password";
static const char *promptToSubmitKeyC = "PromptForSubmit";
static const char *timeOutKeyC = "TimeOut";
static const char *spaceIgnorantAnnotationKeyC = "SpaceIgnorantAnnotation";
static const char *logCountKeyC = "LogCount";
static const char userNameOptionC[] = "--username";
static const char passwordOptionC[] = "--password";
static const char promptToSubmitKeyC[] = "PromptForSubmit";
static const char timeOutKeyC[] = "TimeOut";
static const char spaceIgnorantAnnotationKeyC[] = "SpaceIgnorantAnnotation";
static const char logCountKeyC[] = "LogCount";
enum { defaultTimeOutS = 30, defaultLogCount = 1000 };
@@ -128,23 +127,3 @@ QStringList SubversionSettings::addOptions(const QStringList &args) const
rc.append(args);
return rc;
}
// Format arguments for log windows hiding passwords, etc.
QString SubversionSettings::formatArguments(const QStringList &args)
{
QString rc;
QTextStream str(&rc);
const int size = args.size();
// Skip authentication options
for (int i = 0; i < size; i++) {
const QString &arg = args.at(i);
if (i)
str << ' ';
str << arg;
if (arg == QLatin1String(userNameOptionC) || arg == QLatin1String(passwordOptionC)) {
str << " ********";
i++;
}
}
return rc;
}