From 116f6523ad1880283189a15fe2eac2e59df923f4 Mon Sep 17 00:00:00 2001 From: Oleg Shpynov Date: Mon, 13 Dec 2010 14:10:22 +0300 Subject: [PATCH] Perform remote update after adding remote --- .../jetbrains/plugins/github/GithubRebaseAction.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/plugins/github/src/org/jetbrains/plugins/github/GithubRebaseAction.java b/plugins/github/src/org/jetbrains/plugins/github/GithubRebaseAction.java index 89defbbbe16e..6b99a619159f 100644 --- a/plugins/github/src/org/jetbrains/plugins/github/GithubRebaseAction.java +++ b/plugins/github/src/org/jetbrains/plugins/github/GithubRebaseAction.java @@ -144,6 +144,16 @@ public class GithubRebaseAction extends DumbAwareAction { return; } + LOG.info("Updating remotes"); + final GitSimpleHandler updateRemotesHandler = new GitSimpleHandler(project, root, GitCommand.REMOTE); + updateRemotesHandler.setNoSSH(true); + updateRemotesHandler.setSilent(true); + updateRemotesHandler.addParameters("update"); + updateRemotesHandler.run(); + if (updateRemotesHandler.getExitCode() != 0) { + Messages.showErrorDialog("Failed to update remotes", CANNOT_PERFORM_GITHUB_REBASE); + return; + } } BasicAction.saveAll();