This commit is contained in:
Kirill Likhodedov
2012-02-07 20:22:37 +04:00
parent 8126f0ac18
commit b6b074e3a2
@@ -111,7 +111,10 @@ class GitCheckoutOperation extends GitBranchOperation {
// get changes overwritten by checkout from the error message captured from Git
List<Change> affectedChanges = GitUtil.convertPathsToChanges(repository, localChangesOverwrittenByCheckout.getRelativeFilePaths(), true);
// get all other conflicting changes
Map<GitRepository, List<Change>> conflictingChangesInRepositories = collectLocalChangesOnAllOtherRepositories(repository);
// get changes in all other repositories (except those which already have succeeded) to avoid multiple dialogs proposing smart checkout
Map<GitRepository, List<Change>> conflictingChangesInRepositories =
collectLocalChangesConflictingWithBranch(myProject, getRemainingRepositoriesExceptGiven(repository), myPreviousBranch, myStartPointReference);
Set<GitRepository> otherProblematicRepositories = conflictingChangesInRepositories.keySet();
List<GitRepository> allConflictingRepositories = new ArrayList<GitRepository>(otherProblematicRepositories);
allConflictingRepositories.add(repository);
@@ -156,13 +159,6 @@ class GitCheckoutOperation extends GitBranchOperation {
}
}
@NotNull
private Map<GitRepository, List<Change>> collectLocalChangesOnAllOtherRepositories(@NotNull final GitRepository currentRepository) {
// get changes in all other repositories (except those which already have succeeded) to avoid multiple dialogs proposing smart checkout
List<GitRepository> remainingRepositories = getRemainingRepositoriesExceptGiven(currentRepository);
return collectLocalChangesConflictingWithBranch(myProject, remainingRepositories, myPreviousBranch, myStartPointReference);
}
@NotNull
@Override
protected String getRollbackProposal() {