| 21 | } |
| 22 | |
| 23 | void SvnInternalRemoveJob::run(ThreadWeaver::JobPointer /*self*/, ThreadWeaver::Thread* /*thread*/) |
| 24 | { |
| 25 | initBeforeRun(); |
| 26 | |
| 27 | svn::Client cli(m_ctxt); |
| 28 | std::vector<svn::Path> targets; |
| 29 | const QList<QUrl> l = locations(); |
| 30 | for (const QUrl& url : l) { |
| 31 | QByteArray ba = url.toString( QUrl::PreferLocalFile | QUrl::StripTrailingSlash ).toUtf8(); |
| 32 | targets.push_back( svn::Path( ba.data() ) ); |
| 33 | } |
| 34 | try |
| 35 | { |
| 36 | cli.remove( svn::Targets( targets ), force() ); |
| 37 | |
| 38 | }catch( const svn::ClientException& ce ) |
| 39 | { |
| 40 | qCDebug(PLUGIN_SVN) << "Exception while removing files: " |
| 41 | << m_locations |
| 42 | << QString::fromUtf8( ce.message() ); |
| 43 | setErrorMessage( QString::fromUtf8( ce.message() ) ); |
| 44 | m_success = false; |
| 45 | } |
| 46 | } |
| 47 | |
| 48 | void SvnInternalRemoveJob::setLocations( const QList<QUrl>& urls ) |
| 49 | { |