[hg] Update HgWidget with current revision after commit.
authorKirill Likhodedov <kirill.likhodedov@jetbrains.com>
Thu, 14 Apr 2011 13:05:28 +0000 (17:05 +0400)
committerKirill Likhodedov <kirill.likhodedov@jetbrains.com>
Mon, 18 Apr 2011 09:15:03 +0000 (13:15 +0400)
plugins/hg4idea/src/org/zmlx/hg4idea/command/HgCommitCommand.java

index c4ac4d2e3ea629471b340b8a45cc63c6be060c36..7c4f40ceb527e93c97fffce85a97ab7487423a21 100644 (file)
@@ -17,6 +17,7 @@ import com.intellij.openapi.diagnostic.Logger;
 import com.intellij.openapi.project.Project;
 import com.intellij.openapi.vcs.VcsException;
 import com.intellij.openapi.vfs.VirtualFile;
+import com.intellij.util.messages.MessageBus;
 import org.apache.commons.lang.StringUtils;
 import org.jetbrains.annotations.NotNull;
 import org.zmlx.hg4idea.HgFile;
@@ -71,7 +72,9 @@ public class HgCommitCommand {
         parameters.add(hgFile.getRelativePath());
       }
       ensureSuccess(new HgCommandExecutor(project).executeInCurrentThread(repo, "commit", parameters));
-      project.getMessageBus().syncPublisher(HgVcs.REMOTE_TOPIC).update(project);
+      final MessageBus messageBus = project.getMessageBus();
+      messageBus.syncPublisher(HgVcs.REMOTE_TOPIC).update(project);
+      messageBus.syncPublisher(HgVcs.BRANCH_TOPIC).update(project);
     } catch (IOException e) {
       LOG.info(e);
     }