| 21 | } |
| 22 | |
| 23 | void SvnInternalRevertJob::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.revert( svn::Targets( targets ), recursive() ); |
| 37 | }catch( const svn::ClientException& ce ) |
| 38 | { |
| 39 | qCDebug(PLUGIN_SVN) << "Exception while reverting files: " |
| 40 | << m_locations |
| 41 | << QString::fromUtf8( ce.message() ); |
| 42 | setErrorMessage( QString::fromUtf8( ce.message() ) ); |
| 43 | m_success = false; |
| 44 | } |
| 45 | } |
| 46 | |
| 47 | void SvnInternalRevertJob::setRecursive( bool recursive ) |
| 48 | { |