# HG changeset patch # User Artem Tikhomirov # Date 1320810996 -3600 # Node ID 467fd379b653fd635d1897d13f0255450818df1b # Parent 72c6eda838a62d3860a4832b7c81a3002cf6a781 Specific accessor that omits predefined entries in the [paths] section diff -r 72c6eda838a6 -r 467fd379b653 src/org/tmatesoft/hg/repo/HgRepoConfig.java --- 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 getKeys() { + // PathsSection depends on return value being modifiable return new ArrayList(config.getSection(section).keySet()); } @@ -171,6 +172,17 @@ PathsSection() { super("paths"); } + + /** + * Similar to {@link #getKeys()}, but without entries for default and default-push paths + * @return list of path symbolic names + */ + public List getPathSymbolicNames() { + final List rv = getKeys(); + rv.remove("default"); + rv.remove("default-push"); + return rv; + } public boolean hasDefault() { return isKeySet("default");