diff --git a/plugins/hg4idea/src/org/zmlx/hg4idea/command/HgShowConfigCommand.java b/plugins/hg4idea/src/org/zmlx/hg4idea/command/HgShowConfigCommand.java index 737eac4f7acb..726708f20d3e 100644 --- a/plugins/hg4idea/src/org/zmlx/hg4idea/command/HgShowConfigCommand.java +++ b/plugins/hg4idea/src/org/zmlx/hg4idea/command/HgShowConfigCommand.java @@ -33,6 +33,15 @@ public class HgShowConfigCommand { return execute(repo).get("paths.default"); } + public String getDefaultPushPath(VirtualFile repo) { + final Map map = execute(repo); + String path = map.get("paths.default-push"); + if (path == null) { + path = map.get("paths.default"); + } + return path; + } + public Map execute(VirtualFile repo) { if (repo == null) { return Collections.emptyMap(); diff --git a/plugins/hg4idea/src/org/zmlx/hg4idea/ui/HgPushDialog.java b/plugins/hg4idea/src/org/zmlx/hg4idea/ui/HgPushDialog.java index 76002d0bb29e..425f2fe95a98 100644 --- a/plugins/hg4idea/src/org/zmlx/hg4idea/ui/HgPushDialog.java +++ b/plugins/hg4idea/src/org/zmlx/hg4idea/ui/HgPushDialog.java @@ -105,7 +105,7 @@ public class HgPushDialog extends DialogWrapper { private void updateRepository() { final VirtualFile repo = hgRepositorySelectorComponent.getRepository(); final HgShowConfigCommand configCommand = new HgShowConfigCommand(myProject); - final String defaultPath = configCommand.getDefaultPath(repo); + final String defaultPath = configCommand.getDefaultPushPath(repo); repositoryTxt.setText(defaultPath); loadBranches(repo); update();