# HG changeset patch # User Artem Tikhomirov # Date 1324507600 -10800 # Node ID 091666b87f62db75817f3806d6fed860a90707ee # Parent 8107b95f4280259cf86b10987abacd838af14ec0 Issue 21: Recognize extensions with prefixed names diff -r 8107b95f4280 -r 091666b87f62 src/org/tmatesoft/hg/repo/HgRepoConfig.java --- a/src/org/tmatesoft/hg/repo/HgRepoConfig.java Fri Dec 16 16:00:57 2011 +0100 +++ b/src/org/tmatesoft/hg/repo/HgRepoConfig.java Thu Dec 22 01:46:40 2011 +0300 @@ -210,9 +210,19 @@ } public boolean isEnabled(String extensionName) { - String value = config.getSection(section).get(extensionName); - // empty line, just "extension =" is valid way to enable it - return value != null && (value.length() == 0 || '!' != value.charAt(0)); + final Map sect = config.getSection(section); + String value = sect.get(extensionName); + if (value == null) { + value = sect.get("hgext." + extensionName); + } + if (value == null) { + value = sect.get("hgext/" + extensionName); + } + if (value != null) { + // empty line, just "extension =" is valid way to enable it + return value.length() == 0 || '!' != value.charAt(0); + } + return false; } } }