Added few new functions to IVersionControl, VCSManager and GeneratedFile to support the funcationality needed by the trac plugin.

All the version control plugins updated to have implementations according to the interface changes.

Merge-request: 2178
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>

Merge-request: 2178
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
This commit is contained in:
Tuomas Puranen
2010-09-29 12:16:35 +02:00
committed by Tobias Hunger
parent 32fff3f6cd
commit 65e95c3aba
21 changed files with 328 additions and 3 deletions

View File

@@ -167,6 +167,42 @@ 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(Core::IVersionControl::CheckoutOperation)) {
if (versionControl->vcsCheckout(directory,url)) {
m_d->m_cachedMatches.insert(directory, versionControl);
return versionControl;
}
return 0;
}
}
return 0;
}
bool VCSManager::findVersionControl(const QString &versionControlType)
{
foreach (IVersionControl * versionControl, allVersionControls()) {
if (versionControl->displayName() == versionControlType) {
return true;
}
}
return false;
}
QString VCSManager::getRepositoryURL(const QString &directory)
{
IVersionControl *vc = findVersionControlForDirectory(directory);
if (vc && vc->supportsOperation(Core::IVersionControl::GetRepositoryRootOperation))
return vc->vcsGetRepositoryURL(directory);
return QString();
}
bool VCSManager::promptToDelete(IVersionControl *vc, const QString &fileName)
{
QTC_ASSERT(vc, return true)