From a3ce50016ad3ec3a31b93c575263b1cc0b1e4b53 Mon Sep 17 00:00:00 2001 From: Kirill Likhodedov Date: Wed, 5 Oct 2011 15:44:21 +0400 Subject: [PATCH] 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. --- plugins/hg4idea/src/org/zmlx/hg4idea/HgVcs.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/hg4idea/src/org/zmlx/hg4idea/HgVcs.java b/plugins/hg4idea/src/org/zmlx/hg4idea/HgVcs.java index d2537775f9db..92f8c79e66ec 100644 --- a/plugins/hg4idea/src/org/zmlx/hg4idea/HgVcs.java +++ b/plugins/hg4idea/src/org/zmlx/hg4idea/HgVcs.java @@ -273,12 +273,13 @@ public class HgVcs extends AbstractVcs { // 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);