Subversion: Fixed "add" with authentication for svn pre 1.5

The older versions do not accept --username option, omit it.

Task-number: 255470
This commit is contained in:
Friedemann Kleint
2009-07-29 08:48:21 +02:00
parent c297a4ac55
commit 5852305061

View File

@@ -96,6 +96,10 @@ QStringList SubversionSettings::addOptions(const QStringList &args) const
{ {
if (!useAuthentication || user.isEmpty()) if (!useAuthentication || user.isEmpty())
return args; return args;
// SVN pre 1.5 does not accept "--userName" for "add", which is most likely
// an oversight. As no password is needed for the option, generally omit it.
if (!args.empty() && args.front() == QLatin1String("add"))
return args;
QStringList rc; QStringList rc;
rc.push_back(QLatin1String(userNameOptionC)); rc.push_back(QLatin1String(userNameOptionC));