Commit 6d7c2eed authored by Tobias Hunger's avatar Tobias Hunger

Core: Remove unused functionality to checkout from VCS

Change-Id: I1ee17142e14200c5ae9597bbf9bee3f3978704f4
Reviewed-by: Orgad Shaneh's avatarOrgad Shaneh <orgads@gmail.com>
parent fdadddfb
......@@ -88,7 +88,6 @@ bool BazaarControl::supportsOperation(Operation operation) const
case Core::IVersionControl::AnnotateOperation:
case Core::IVersionControl::GetRepositoryRootOperation:
break;
case Core::IVersionControl::CheckoutOperation:
case Core::IVersionControl::SnapshotOperations:
supported = false;
break;
......@@ -135,13 +134,6 @@ bool BazaarControl::vcsAnnotate(const QString &file, int line)
return true;
}
bool BazaarControl::vcsCheckout(const QString &directory, const QByteArray &url)
{
Q_UNUSED(directory);
Q_UNUSED(url);
return false;
}
QString BazaarControl::vcsGetRepositoryURL(const QString &directory)
{
const QString repositoryRoot = m_bazaarClient->findTopLevelForFile(directory);
......
......@@ -62,7 +62,6 @@ public:
bool vcsDelete(const QString &filename);
bool vcsMove(const QString &from, const QString &to);
bool vcsCreateRepository(const QString &directory);
bool vcsCheckout(const QString &directory, const QByteArray &url);
QString vcsGetRepositoryURL(const QString &directory);
bool vcsAnnotate(const QString &file, int line);
......
......@@ -79,7 +79,6 @@ bool ClearCaseControl::supportsOperation(Operation operation) const
case AnnotateOperation:
case GetRepositoryRootOperation:
break;
case CheckoutOperation:
case CreateRepositoryOperation:
case SnapshotOperations:
rc = false;
......@@ -194,11 +193,6 @@ void ClearCaseControl::emitConfigurationChanged()
emit configurationChanged();
}
bool ClearCaseControl::vcsCheckout(const QString & /*directory*/, const QByteArray & /*url*/)
{
return false;
}
bool ClearCaseControl::vcsCreateRepository(const QString &)
{
return false;
......
......@@ -61,7 +61,6 @@ public:
bool vcsDelete(const QString &filename);
bool vcsMove(const QString &from, const QString &to);
bool vcsCreateRepository(const QString &directory);
bool vcsCheckout(const QString &directory, const QByteArray &url);
QString vcsGetRepositoryURL(const QString &directory);
bool vcsAnnotate(const QString &file, int line);
......
......@@ -57,7 +57,6 @@ public:
CreateRepositoryOperation,
SnapshotOperations,
AnnotateOperation,
CheckoutOperation,
GetRepositoryRootOperation
};
......@@ -169,11 +168,6 @@ public:
*/
virtual bool vcsCreateRepository(const QString &directory) = 0;
/*!
* Called to clone/checkout the version control system in a directory.
*/
virtual bool vcsCheckout(const QString &directory, const QByteArray &url) = 0;
/*!
* Called to get the version control repository root.
*/
......@@ -251,7 +245,6 @@ public:
bool vcsDelete(const QString &) { return false; }
bool vcsMove(const QString &, const QString &) { return false; }
bool vcsCreateRepository(const QString &) { return false; }
bool vcsCheckout(const QString &, const QByteArray &) { return false; }
QString vcsGetRepositoryURL(const QString &) { return QString(); }
bool vcsAnnotate(const QString &, int) { return false; }
......
......@@ -367,23 +367,6 @@ bool VcsManager::promptToDelete(const QString &fileName)
return true;
}
IVersionControl *VcsManager::checkout(const QString &versionControlType,
const QString &directory,
const QByteArray &url)
{
foreach (IVersionControl *versionControl, allVersionControls()) {
if (versionControl->displayName() == versionControlType
&& versionControl->supportsOperation(IVersionControl::CheckoutOperation)) {
if (versionControl->vcsCheckout(directory, url)) {
d->cache(versionControl, directory, directory);
return versionControl;
}
return 0;
}
}
return 0;
}
bool VcsManager::promptToDelete(IVersionControl *vc, const QString &fileName)
{
QTC_ASSERT(vc, return true);
......
......@@ -70,10 +70,6 @@ public:
static QStringList repositories(const IVersionControl *);
static IVersionControl *checkout(const QString &versionControlType,
const QString &directory,
const QByteArray &url);
// Shows a confirmation dialog, whether the file should also be deleted
// from revision control. Calls vcsDelete on the file. Returns false
// if a failure occurs
......
......@@ -74,7 +74,6 @@ bool CvsControl::supportsOperation(Operation operation) const
case MoveOperation:
case CreateRepositoryOperation:
case SnapshotOperations:
case CheckoutOperation:
case GetRepositoryRootOperation:
rc = false;
break;
......@@ -123,11 +122,6 @@ QString CvsControl::vcsGetRepositoryURL(const QString &)
return QString();
}
bool CvsControl::vcsCheckout(const QString &, const QByteArray &)
{
return false;
}
bool CvsControl::vcsAnnotate(const QString &file, int line)
{
const QFileInfo fi(file);
......
......@@ -59,7 +59,6 @@ public:
bool vcsDelete(const QString &filename);
bool vcsMove(const QString &from, const QString &to);
bool vcsCreateRepository(const QString &directory);
bool vcsCheckout(const QString &directory, const QByteArray &url);
QString vcsGetRepositoryURL(const QString &directory);
bool vcsAnnotate(const QString &file, int line);
......
......@@ -98,7 +98,6 @@ bool GitVersionControl::supportsOperation(Operation operation) const
case CreateRepositoryOperation:
case SnapshotOperations:
case AnnotateOperation:
case CheckoutOperation:
case GetRepositoryRootOperation:
return true;
}
......@@ -134,11 +133,6 @@ bool GitVersionControl::vcsCreateRepository(const QString &directory)
return m_client->synchronousInit(directory);
}
bool GitVersionControl::vcsCheckout(const QString &directory, const QByteArray &url)
{
return m_client->cloneRepository(directory,url);
}
QString GitVersionControl::vcsGetRepositoryURL(const QString &directory)
{
return m_client->vcsGetRepositoryURL(directory);
......
......@@ -58,7 +58,6 @@ public:
bool vcsDelete(const QString &filename);
bool vcsMove(const QString &from, const QString &to);
bool vcsCreateRepository(const QString &directory);
bool vcsCheckout(const QString &directory, const QByteArray &url);
QString vcsGetRepositoryURL(const QString &directory);
bool vcsAnnotate(const QString &file, int line);
......
......@@ -112,7 +112,6 @@ bool MercurialControl::supportsOperation(Operation operation) const
case Core::IVersionControl::MoveOperation:
case Core::IVersionControl::CreateRepositoryOperation:
case Core::IVersionControl::AnnotateOperation:
case Core::IVersionControl::CheckoutOperation:
case Core::IVersionControl::GetRepositoryRootOperation:
break;
case Core::IVersionControl::SnapshotOperations:
......@@ -172,11 +171,6 @@ bool MercurialControl::sccManaged(const QString &filename)
return mercurialClient->manifestSync(topLevel, topLevelDir.relativeFilePath(filename));
}
bool MercurialControl::vcsCheckout(const QString &directory, const QByteArray &url)
{
return mercurialClient->synchronousClone(QString(), directory, QLatin1String(url));
}
QString MercurialControl::vcsGetRepositoryURL(const QString &directory)
{
return mercurialClient->vcsGetRepositoryURL(directory);
......
......@@ -62,7 +62,6 @@ public:
bool vcsDelete(const QString &filename);
bool vcsMove(const QString &from, const QString &to);
bool vcsCreateRepository(const QString &directory);
bool vcsCheckout(const QString &directory, const QByteArray &url);
QString vcsGetRepositoryURL(const QString &directory);
bool sccManaged(const QString &filename);
bool vcsAnnotate(const QString &file, int line);
......
......@@ -76,7 +76,6 @@ bool PerforceVersionControl::supportsOperation(Operation operation) const
return supported;
case CreateRepositoryOperation:
case SnapshotOperations:
case CheckoutOperation:
case GetRepositoryRootOperation:
break;
}
......@@ -134,11 +133,6 @@ bool PerforceVersionControl::vcsAnnotate(const QString &file, int line)
return true;
}
bool PerforceVersionControl::vcsCheckout(const QString &,const QByteArray &)
{
return false;
}
QString PerforceVersionControl::vcsGetRepositoryURL(const QString &)
{
return QString();
......
......@@ -59,7 +59,6 @@ public:
bool vcsDelete(const QString &filename);
bool vcsMove(const QString &from, const QString &to);
bool vcsCreateRepository(const QString &directory);
bool vcsCheckout(const QString &directory, const QByteArray &url);
QString vcsGetRepositoryURL(const QString &directory);
bool vcsAnnotate(const QString &file, int line);
QString vcsOpenText() const;
......
......@@ -93,7 +93,6 @@ bool SubversionControl::supportsOperation(Operation operation) const
case DeleteOperation:
case MoveOperation:
case AnnotateOperation:
case CheckoutOperation:
case GetRepositoryRootOperation:
break;
case CreateRepositoryOperation:
......@@ -129,11 +128,6 @@ bool SubversionControl::vcsMove(const QString &from, const QString &to)
return m_plugin->vcsMove(fromInfo.absolutePath(), fromInfo.absoluteFilePath(), toInfo.absoluteFilePath());
}
bool SubversionControl::vcsCheckout(const QString &directory, const QByteArray &url)
{
return m_plugin->vcsCheckout(directory, url);
}
QString SubversionControl::vcsGetRepositoryURL(const QString &directory)
{
return m_plugin->vcsGetRepositoryURL(directory);
......
......@@ -57,7 +57,6 @@ public:
bool vcsDelete(const QString &filename);
bool vcsMove(const QString &from, const QString &to);
bool vcsCreateRepository(const QString &directory);
bool vcsCheckout(const QString &directory, const QByteArray &url);
QString vcsGetRepositoryURL(const QString &directory);
bool vcsAnnotate(const QString &file, int line);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment