mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
git update: check if update is possible under try-block
checkRebaseInProgress and other checks not only check, but also show the merge tool, change code, continue rebase, etc. Thus block reloading project on external change for these operations.
This commit is contained in:
@@ -75,14 +75,15 @@ public class GitUpdateProcess {
|
||||
*/
|
||||
public boolean update() {
|
||||
LOG.info("update started");
|
||||
// check if update is possible
|
||||
if (checkRebaseInProgress() || checkMergeInProgress() || checkUnmergedFiles()) { return false; }
|
||||
if (!allTrackedBranchesConfigured()) { return false; }
|
||||
|
||||
final GitChangesSaver saver = GitChangesSaver.getSaver(myProject, myProgressIndicator,
|
||||
"Uncommitted changes before update operation at " + DateFormatUtil.formatDateTime(Clock.getTime()));
|
||||
|
||||
myProjectManager.blockReloadingProjectOnExternalChanges();
|
||||
try {
|
||||
// check if update is possible
|
||||
if (checkRebaseInProgress() || checkMergeInProgress() || checkUnmergedFiles()) { return false; }
|
||||
if (!allTrackedBranchesConfigured()) { return false; }
|
||||
|
||||
saver.saveLocalChanges();
|
||||
// update each root
|
||||
boolean incomplete = false;
|
||||
|
||||
Reference in New Issue
Block a user