comparison src/org/tmatesoft/hg/repo/HgLookup.java @ 483:e31e85cf4d4c

Handle include and unset directives in config files
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Tue, 07 Aug 2012 19:14:53 +0200
parents 909306e412e2
children e4eaa23e3442
comparison
equal deleted inserted replaced
482:6c67debed07e 483:e31e85cf4d4c
130 return new HgRemoteRepository(getContext(), url); 130 return new HgRemoteRepository(getContext(), url);
131 } 131 }
132 132
133 private ConfigFile getGlobalConfig() { 133 private ConfigFile getGlobalConfig() {
134 if (globalCfg == null) { 134 if (globalCfg == null) {
135 globalCfg = new ConfigFile(); 135 globalCfg = new ConfigFile(getContext());
136 try { 136 try {
137 globalCfg.addLocation(new File(System.getProperty("user.home"), ".hgrc")); 137 globalCfg.addLocation(new File(System.getProperty("user.home"), ".hgrc"));
138 } catch (IOException ex) { 138 } catch (HgInvalidFileException ex) {
139 // XXX perhaps, makes sense to let caller/client know that we've failed to read global config? 139 // XXX perhaps, makes sense to let caller/client know that we've failed to read global config?
140 getContext().getLog().dump(getClass(), Warn, ex, null); 140 getContext().getLog().dump(getClass(), Warn, ex, null);
141 } 141 }
142 } 142 }
143 return globalCfg; 143 return globalCfg;