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:
cerf
2011-03-15 15:47:45 +01:00
committed by Tobias Hunger
parent 12c7c72e83
commit 455a85bd86
7 changed files with 28 additions and 1 deletions

View File

@@ -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() +