Mercurial > hg4j
comparison src/org/tmatesoft/hg/internal/Internals.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 | b3c16d1aede0 |
comparison
equal
deleted
inserted
replaced
| 482:6c67debed07e | 483:e31e85cf4d4c |
|---|---|
| 244 | 244 |
| 245 /** | 245 /** |
| 246 * @see http://www.selenic.com/mercurial/hgrc.5.html | 246 * @see http://www.selenic.com/mercurial/hgrc.5.html |
| 247 */ | 247 */ |
| 248 public ConfigFile readConfiguration(HgRepository hgRepo, File repoRoot) throws IOException { | 248 public ConfigFile readConfiguration(HgRepository hgRepo, File repoRoot) throws IOException { |
| 249 ConfigFile configFile = new ConfigFile(); | 249 // XXX Internals now have sessionContext field, is there real need to extract one from the repo? |
| 250 File hgInstallRoot = findHgInstallRoot(HgInternals.getContext(hgRepo)); // may be null | 250 SessionContext sessionCtx = HgInternals.getContext(hgRepo); |
| 251 ConfigFile configFile = new ConfigFile(sessionCtx); | |
| 252 File hgInstallRoot = findHgInstallRoot(sessionCtx); // may be null | |
| 251 // | 253 // |
| 252 if (runningOnWindows()) { | 254 if (runningOnWindows()) { |
| 253 if (hgInstallRoot != null) { | 255 if (hgInstallRoot != null) { |
| 254 for (File f : getWindowsConfigFilesPerInstall(hgInstallRoot)) { | 256 for (File f : getWindowsConfigFilesPerInstall(hgInstallRoot)) { |
| 255 configFile.addLocation(f); | 257 configFile.addLocation(f); |
