Subversion: Remove dead ends

It looks like the alternative implementation of vcsCheckout()
is currently createInitialCheckoutCommand().

Detected by Axivion plugin.

Change-Id: Iab375bf5839ee87345c01a682bc04e33198f6023
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
Jarek Kobus
2025-02-06 14:59:53 +01:00
parent 008b1c94c2
commit 2c120b24a6

View File

@@ -167,9 +167,6 @@ public:
bool vcsAdd(const FilePath &workingDir, const QString &fileName); bool vcsAdd(const FilePath &workingDir, const QString &fileName);
bool vcsDelete(const FilePath &workingDir, const QString &fileName); bool vcsDelete(const FilePath &workingDir, const QString &fileName);
bool vcsMove(const FilePath &workingDir, const QString &from, const QString &to); bool vcsMove(const FilePath &workingDir, const QString &from, const QString &to);
bool vcsCheckout(const FilePath &directory, const QByteArray &url);
static SubversionPluginPrivate *instance();
QString monitorFile(const FilePath &repository) const; QString monitorFile(const FilePath &repository) const;
QString synchronousTopic(const FilePath &repository) const; QString synchronousTopic(const FilePath &repository) const;
@@ -939,12 +936,6 @@ IEditor *SubversionPluginPrivate::showOutputInEditor(const QString &title, const
return editor; return editor;
} }
SubversionPluginPrivate *SubversionPluginPrivate::instance()
{
QTC_ASSERT(dd, return dd);
return dd;
}
QString SubversionPluginPrivate::monitorFile(const FilePath &repository) const QString SubversionPluginPrivate::monitorFile(const FilePath &repository) const
{ {
QTC_ASSERT(!repository.isEmpty(), return QString()); QTC_ASSERT(!repository.isEmpty(), return QString());
@@ -994,33 +985,6 @@ bool SubversionPluginPrivate::vcsMove(const FilePath &workingDir, const QString
== ProcessResult::FinishedWithSuccess; == ProcessResult::FinishedWithSuccess;
} }
bool SubversionPluginPrivate::vcsCheckout(const FilePath &directory, const QByteArray &url)
{
QUrl tempUrl = QUrl::fromEncoded(url);
const QString username = tempUrl.userName();
const QString password = tempUrl.password();
CommandLine args{settings().binaryPath(), {"checkout"}};
args << Constants::NON_INTERACTIVE_OPTION;
if (!username.isEmpty()) {
// If url contains username and password we have to use separate username and password
// arguments instead of passing those in the url. Otherwise the subversion 'non-interactive'
// authentication will always fail (if the username and password data are not stored locally),
// if for example we are logging into a new host for the first time using svn. There seems to
// be a bug in subversion, so this might get fixed in the future.
tempUrl.setUserInfo({});
args << "--username" << username;
if (!password.isEmpty())
args << "--password";
args.addMaskedArg(password);
}
args << QString::fromLatin1(tempUrl.toEncoded()) << directory.toUrlishString();
return runSvn(directory, args, RunFlags::None, nullptr, 10).result()
== ProcessResult::FinishedWithSuccess;
}
bool SubversionPluginPrivate::managesDirectory(const FilePath &directory, FilePath *topLevel /* = 0 */) const bool SubversionPluginPrivate::managesDirectory(const FilePath &directory, FilePath *topLevel /* = 0 */) const
{ {
const QStringList filesToCheck = transform(m_svnDirectories, [](const QString &s) { const QStringList filesToCheck = transform(m_svnDirectories, [](const QString &s) {