mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-64890 hg push to default-push, if defined, or to default otherwise.
This commit is contained in:
@@ -33,6 +33,15 @@ public class HgShowConfigCommand {
|
||||
return execute(repo).get("paths.default");
|
||||
}
|
||||
|
||||
public String getDefaultPushPath(VirtualFile repo) {
|
||||
final Map<String, String> map = execute(repo);
|
||||
String path = map.get("paths.default-push");
|
||||
if (path == null) {
|
||||
path = map.get("paths.default");
|
||||
}
|
||||
return path;
|
||||
}
|
||||
|
||||
public Map<String, String> execute(VirtualFile repo) {
|
||||
if (repo == null) {
|
||||
return Collections.emptyMap();
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user