! Setup version control for a new project defined by @p info. Use @p scratchArea for temporary files */
| 188 | |
| 189 | /*! Setup version control for a new project defined by @p info. Use @p scratchArea for temporary files */ |
| 190 | bool 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 | |
| 214 | QString generateIdentifier( const QString& appname ) |
| 215 | { |
no test coverage detected