| 22 | } |
| 23 | |
| 24 | void SvnInternalUpdateJob::run(ThreadWeaver::JobPointer /*self*/, ThreadWeaver::Thread* /*thread*/) |
| 25 | { |
| 26 | initBeforeRun(); |
| 27 | |
| 28 | svn::Client cli(m_ctxt); |
| 29 | std::vector<svn::Path> targets; |
| 30 | const QList<QUrl> l = locations(); |
| 31 | for (const QUrl& url : l) { |
| 32 | QByteArray ba = url.toString( QUrl::PreferLocalFile | QUrl::StripTrailingSlash ).toUtf8(); |
| 33 | targets.push_back( svn::Path( ba.data() ) ); |
| 34 | } |
| 35 | try |
| 36 | { |
| 37 | svn::Revision rev = createSvnCppRevisionFromVcsRevision( m_revision ); |
| 38 | if( rev.kind() == svn_opt_revision_unspecified ) |
| 39 | { |
| 40 | m_success = false; |
| 41 | return; |
| 42 | } |
| 43 | cli.update( svn::Targets( targets ), rev, recursive(), ignoreExternals() ); |
| 44 | }catch( const svn::ClientException& ce ) |
| 45 | { |
| 46 | qCDebug(PLUGIN_SVN) << "Exception while updating files: " |
| 47 | << m_locations |
| 48 | << QString::fromUtf8( ce.message() ); |
| 49 | setErrorMessage( QString::fromUtf8( ce.message() ) ); |
| 50 | m_success = false; |
| 51 | } |
| 52 | } |
| 53 | |
| 54 | void SvnInternalUpdateJob::setRecursive( bool recursive ) |
| 55 | { |