MCPcopy Create free account
hub / github.com/KDE/kdevelop / initializeCVCS

Function initializeCVCS

plugins/appwizard/appwizardplugin.cpp:190–212  ·  view source on GitHub ↗

! Setup version control for a new project defined by @p info. Use @p scratchArea for temporary files */

Source from the content-addressed store, hash-verified

188
189/*! Setup version control for a new project defined by @p info. Use @p scratchArea for temporary files */
190bool initializeCVCS(ICentralizedVersionControl* cvcs, const ApplicationInfo& info, QTemporaryDir& scratchArea)
191{
192 Q_ASSERT(cvcs);
193
194 qCDebug(PLUGIN_APPWIZARD) << "Importing" << info.sourceLocation << "to"
195 << info.repository.repositoryServer();
196 VcsJob* job = cvcs->import( info.importCommitMessage, QUrl::fromLocalFile(scratchArea.path()), info.repository);
197 if (!job || !job->exec() || job->status() != VcsJob::JobSucceeded )
198 {
199 vcsError(i18n("Could not import project"), scratchArea, QUrl::fromUserInput(info.repository.repositoryServer()));
200 return false;
201 }
202
203 qCDebug(PLUGIN_APPWIZARD) << "Checking out";
204 job = cvcs->createWorkingCopy( info.repository, info.location, IBasicVersionControl::Recursive);
205 if (!job || !job->exec() || job->status() != VcsJob::JobSucceeded )
206 {
207 vcsError(i18n("Could not checkout imported project"), scratchArea, QUrl::fromUserInput(info.repository.repositoryServer()));
208 return false;
209 }
210
211 return true; // initialization phase complete
212}
213
214QString generateIdentifier( const QString& appname )
215{

Callers 1

createProjectMethod · 0.85

Calls 7

vcsErrorFunction · 0.85
repositoryServerMethod · 0.80
execMethod · 0.80
importMethod · 0.45
pathMethod · 0.45
statusMethod · 0.45
createWorkingCopyMethod · 0.45

Tested by

no test coverage detected