Mercurial > hg4j
changeset 333:467fd379b653
Specific accessor that omits predefined entries in the [paths] section
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Wed, 09 Nov 2011 04:56:36 +0100 |
parents | 72c6eda838a6 |
children | 15e1961719f2 |
files | src/org/tmatesoft/hg/repo/HgRepoConfig.java |
diffstat | 1 files changed, 12 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/org/tmatesoft/hg/repo/HgRepoConfig.java Wed Nov 09 04:33:44 2011 +0100 +++ b/src/org/tmatesoft/hg/repo/HgRepoConfig.java Wed Nov 09 04:56:36 2011 +0100 @@ -114,6 +114,7 @@ * @return defined keys, in the order they appear in the section */ public List<String> getKeys() { + // PathsSection depends on return value being modifiable return new ArrayList<String>(config.getSection(section).keySet()); } @@ -171,6 +172,17 @@ PathsSection() { super("paths"); } + + /** + * Similar to {@link #getKeys()}, but without entries for <b>default</b> and <b>default-push</b> paths + * @return list of path symbolic names + */ + public List<String> getPathSymbolicNames() { + final List<String> rv = getKeys(); + rv.remove("default"); + rv.remove("default-push"); + return rv; + } public boolean hasDefault() { return isKeySet("default");