diff --git a/plugins/hg4idea/src/org/zmlx/hg4idea/ui/HgCommonDialogWithChoices.java b/plugins/hg4idea/src/org/zmlx/hg4idea/ui/HgCommonDialogWithChoices.java index ddd92fdfe609..4c7ff6214e94 100644 --- a/plugins/hg4idea/src/org/zmlx/hg4idea/ui/HgCommonDialogWithChoices.java +++ b/plugins/hg4idea/src/org/zmlx/hg4idea/ui/HgCommonDialogWithChoices.java @@ -118,7 +118,6 @@ public class HgCommonDialogWithChoices extends DialogWrapper { private void updateRepository() { HgRepository repo = hgRepositorySelectorComponent.getRepository(); branchSelector.setModel(new DefaultComboBoxModel(repo.getOpenedBranches().toArray())); - tagSelector.setModel(new DefaultComboBoxModel(HgUtil.getNamesWithoutHashes(repo.getTags()).toArray())); DefaultComboBoxModel tagComboBoxModel = new DefaultComboBoxModel(HgUtil.getNamesWithoutHashes(repo.getTags()).toArray()); tagComboBoxModel.addElement("tip"); //HgRepository does not store 'tip' tag because it is internal and not included in tags file tagSelector.setModel(tagComboBoxModel); diff --git a/plugins/hg4idea/src/org/zmlx/hg4idea/util/HgUtil.java b/plugins/hg4idea/src/org/zmlx/hg4idea/util/HgUtil.java index 50bff5cb51c2..ee7f1b4f5ce4 100644 --- a/plugins/hg4idea/src/org/zmlx/hg4idea/util/HgUtil.java +++ b/plugins/hg4idea/src/org/zmlx/hg4idea/util/HgUtil.java @@ -667,6 +667,7 @@ public abstract class HgUtil { names.add(hash.getName()); } } + Collections.sort(names); return names; }