style: sort hg reference names in getNamesWithoutHashes, unnecessary ui model creation removed

This commit is contained in:
Nadya Zabrodina
2014-03-05 17:01:07 +04:00
parent f0aba00a5a
commit 367266abf5
2 changed files with 1 additions and 1 deletions
@@ -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);
@@ -667,6 +667,7 @@ public abstract class HgUtil {
names.add(hash.getName());
}
}
Collections.sort(names);
return names;
}