forked from qt-creator/qt-creator
Bazaar: set global Bazaar user ID when changed
This ID is automatically set when the user settings have been changed and applied from the "Options" dialog. This calls 'bzr whoami' under the hood Merge-request: 275 Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
This commit is contained in:
@@ -34,6 +34,7 @@
|
||||
#include "bazaarclient.h"
|
||||
#include "constants.h"
|
||||
|
||||
#include <vcsbase/vcsbaseclientsettings.h>
|
||||
#include <vcsbase/vcsbaseplugin.h>
|
||||
|
||||
#include <QtCore/QDir>
|
||||
@@ -74,6 +75,15 @@ BazaarClient::BazaarClient(const VCSBase::VCSBaseClientSettings &settings) :
|
||||
{
|
||||
}
|
||||
|
||||
bool BazaarClient::synchronousSetUserId()
|
||||
{
|
||||
QStringList args;
|
||||
args << QLatin1String("whoami")
|
||||
<< QString("%1 <%2>").arg(settings().userName()).arg(settings().email());
|
||||
QByteArray stdOut;
|
||||
return vcsFullySynchronousExec(QDir::currentPath(), args, &stdOut);
|
||||
}
|
||||
|
||||
BranchInfo BazaarClient::synchronousBranchQuery(const QString &repositoryRoot) const
|
||||
{
|
||||
QFile branchConfFile(repositoryRoot + QDir::separator() +
|
||||
|
Reference in New Issue
Block a user