mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -444,11 +444,13 @@ public class FileWatcher {
|
||||
}
|
||||
|
||||
private void writeLine(String line) throws IOException {
|
||||
if (LOG.isDebugEnabled()) {
|
||||
LOG.debug("to fsnotifier: " + line);
|
||||
}
|
||||
|
||||
final Process process = notifierProcess;
|
||||
final BufferedWriter writer = notifierWriter;
|
||||
try {
|
||||
if (LOG.isDebugEnabled()) {
|
||||
LOG.debug("to fsnotifier: " + line);
|
||||
}
|
||||
final BufferedWriter writer = notifierWriter;
|
||||
if (writer != null) {
|
||||
writer.write(line);
|
||||
writer.newLine();
|
||||
@@ -457,7 +459,6 @@ public class FileWatcher {
|
||||
}
|
||||
catch (IOException e) {
|
||||
try {
|
||||
final Process process = notifierProcess;
|
||||
if (process != null) {
|
||||
process.exitValue();
|
||||
}
|
||||
|
||||
@@ -67,4 +67,10 @@ public interface CheckinEnvironment extends VcsProviderMarker {
|
||||
List<VcsException> scheduleUnversionedFilesForAddition(List<VirtualFile> files);
|
||||
|
||||
boolean keepChangeListAfterCommit(ChangeList changeList);
|
||||
|
||||
/**
|
||||
* @return true if VFS refresh has to be performed after commit, because files might have changed during commit
|
||||
* (for example, due to keyword substitution in SVN or read-only status in Perforce).
|
||||
*/
|
||||
boolean isRefreshAfterCommitNeeded();
|
||||
}
|
||||
|
||||
@@ -378,11 +378,26 @@ public class CommitHelper {
|
||||
}
|
||||
|
||||
public void customRefresh() {
|
||||
final List<Change> toRefresh = new ArrayList<Change>();
|
||||
ChangesUtil.processChangesByVcs(myProject, myIncludedChanges, new ChangesUtil.PerVcsProcessor<Change>() {
|
||||
@Override
|
||||
public void process(AbstractVcs vcs, List<Change> items) {
|
||||
CheckinEnvironment ce = vcs.getCheckinEnvironment();
|
||||
if (ce != null && ce.isRefreshAfterCommitNeeded()) {
|
||||
toRefresh.addAll(items);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
if (toRefresh.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
final ProgressIndicator indicator = ProgressManager.getInstance().getProgressIndicator();
|
||||
if (indicator != null) {
|
||||
indicator.setText(VcsBundle.message("commit.dialog.refresh.files"));
|
||||
}
|
||||
RefreshVFsSynchronously.updateChanges(myIncludedChanges);
|
||||
RefreshVFsSynchronously.updateChanges(toRefresh);
|
||||
}
|
||||
|
||||
public Runnable postRefresh() {
|
||||
|
||||
+5
@@ -138,4 +138,9 @@ public class CvsCheckinEnvironment implements CheckinEnvironment {
|
||||
public boolean keepChangeListAfterCommit(ChangeList changeList) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isRefreshAfterCommitNeeded() {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -88,6 +88,11 @@ public class GitCheckinEnvironment implements CheckinEnvironment {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isRefreshAfterCommitNeeded() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public RefreshableOnComponent createAdditionalOptionsPanel(CheckinProjectPanel panel,
|
||||
PairConsumer<Object, Object> additionalDataConsumer) {
|
||||
|
||||
@@ -109,12 +109,6 @@ public abstract class GitHandler {
|
||||
myAppSettings = GitVcsApplicationSettings.getInstance();
|
||||
myProjectSettings = GitVcsSettings.getInstance(myProject);
|
||||
myEnv = new HashMap<String, String>(System.getenv());
|
||||
if (!myEnv.containsKey("HOME")) {
|
||||
String home = System.getProperty("user.home");
|
||||
if (home != null) {
|
||||
myEnv.put("HOME", home);
|
||||
}
|
||||
}
|
||||
myVcs = GitVcs.getInstance(project);
|
||||
myWorkingDirectory = directory;
|
||||
myCommandLine = new GeneralCommandLine();
|
||||
|
||||
@@ -197,6 +197,11 @@ public class HgCheckinEnvironment implements CheckinEnvironment {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isRefreshAfterCommitNeeded() {
|
||||
return false;
|
||||
}
|
||||
|
||||
private Map<VirtualFile, Set<HgFile>> getFilesByRepository(List<Change> changes) {
|
||||
Map<VirtualFile, Set<HgFile>> result = new HashMap<VirtualFile, Set<HgFile>>();
|
||||
for (Change change : changes) {
|
||||
|
||||
@@ -365,6 +365,11 @@ public class SvnCheckinEnvironment17 implements CheckinEnvironment {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isRefreshAfterCommitNeeded() {
|
||||
return true;
|
||||
}
|
||||
|
||||
private class KeepLocksComponent implements RefreshableOnComponent {
|
||||
private final JCheckBox myKeepLocksBox;
|
||||
private boolean myIsKeepLocks;
|
||||
|
||||
@@ -373,6 +373,11 @@ public class SvnCheckinEnvironment implements CheckinEnvironment {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isRefreshAfterCommitNeeded() {
|
||||
return true;
|
||||
}
|
||||
|
||||
private class KeepLocksComponent implements RefreshableOnComponent {
|
||||
private final JCheckBox myKeepLocksBox;
|
||||
private boolean myIsKeepLocks;
|
||||
|
||||
Reference in New Issue
Block a user