mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Create patch from shelf when target file is not under VCS any more -> NPE
http://ea.jetbrains.com/browser/ea_reports/300271
This commit is contained in:
+9
-5
@@ -136,12 +136,16 @@ public class CreatePatchCommitExecutor implements CommitExecutorWithHelp, Projec
|
||||
}
|
||||
myPanel.setFileName(ShelveChangesManager.suggestPatchName(myProject, commitMessage, new File(PATCH_PATH), null));
|
||||
myPanel.setReversePatch(REVERSE_PATCH);
|
||||
|
||||
boolean dvcsIsUsed = false;
|
||||
for (Change change : changes) {
|
||||
final AbstractVcs vcs = ChangesUtil.getVcsForChange(change, myProject);
|
||||
if (VcsType.distibuted.equals(vcs.getType())) {
|
||||
dvcsIsUsed = true;
|
||||
break;
|
||||
|
||||
if (ProjectLevelVcsManager.getInstance(myProject).dvcsUsedInProject()) {
|
||||
for (Change change : changes) {
|
||||
final AbstractVcs vcs = ChangesUtil.getVcsForChange(change, myProject);
|
||||
if (vcs != null && VcsType.distibuted.equals(vcs.getType())) {
|
||||
dvcsIsUsed = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
final List<Change> modified = new ArrayList<Change>();
|
||||
|
||||
Reference in New Issue
Block a user