forked from qt-creator/qt-creator
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:
committed by
Tobias Hunger
parent
32fff3f6cd
commit
65e95c3aba
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user