| 223 | } |
| 224 | |
| 225 | VcsDiff VCSBranchDiffUpdater::update() const |
| 226 | { |
| 227 | VcsRevision srcRev; |
| 228 | srcRev.setRevisionValue(m_src, KDevelop::VcsRevision::GlobalNumber); |
| 229 | // see comment in BranchManager::diffFromBranch() |
| 230 | const auto destRev = VcsRevision::createSpecialRevision(KDevelop::VcsRevision::Working); |
| 231 | QScopedPointer<VcsJob> diffJob(m_vcs->diff(QUrl::fromLocalFile(m_repository), srcRev, destRev)); |
| 232 | const bool success = diffJob ? diffJob->exec() : false; |
| 233 | if (!success) { |
| 234 | KMessageBox::error(nullptr, i18n("Could not create a patch for the current version.")); |
| 235 | return {}; |
| 236 | } |
| 237 | |
| 238 | return diffJob->fetchResults().value<VcsDiff>(); |
| 239 | } |
| 240 | |
| 241 | void BranchManager::diffFromBranch() |
| 242 | { |
nothing calls this directly
no test coverage detected