MCPcopy Create free account
hub / github.com/KDE/kdevelop / update

Method update

kdevplatform/vcs/dvcs/ui/branchmanager.cpp:225–239  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

223}
224
225VcsDiff 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
241void BranchManager::diffFromBranch()
242{

Callers

nothing calls this directly

Calls 4

setRevisionValueMethod · 0.80
execMethod · 0.80
diffMethod · 0.45
fetchResultsMethod · 0.45

Tested by

no test coverage detected