Hg: don't check for incoming/outgoing changes immediately at startup. Instead wait the same interval as between checks.

Reason: check for incoming changes might request an HTTP password - that would be confusing at the startup.
This commit is contained in:
Kirill Likhodedov
2011-10-05 16:15:32 +04:00
committed by Maxim Shafirov
parent 04ad6d2a6d
commit a3ce50016a
@@ -273,12 +273,13 @@ public class HgVcs extends AbstractVcs<CommittedChangeList> {
// updaters and listeners
final HgRemoteStatusUpdater remoteUpdater = new HgRemoteStatusUpdater(this, incomingChangesStatus, outgoingChangesStatus, projectSettings);
int checkIntervalSeconds = HgGlobalSettings.getIncomingCheckIntervalSeconds();
changesUpdaterScheduledFuture = JobScheduler.getScheduler().scheduleWithFixedDelay(
new Runnable() {
public void run() {
remoteUpdater.update(myProject);
}
}, 0, HgGlobalSettings.getIncomingCheckIntervalSeconds(), TimeUnit.SECONDS);
}, checkIntervalSeconds, checkIntervalSeconds, TimeUnit.SECONDS);
messageBusConnection = myProject.getMessageBus().connect();
messageBusConnection.subscribe(REMOTE_TOPIC, remoteUpdater);