diff 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
line wrap: on
line diff
--- a/src/org/tmatesoft/hg/internal/Internals.java	Tue Aug 07 14:27:13 2012 +0200
+++ b/src/org/tmatesoft/hg/internal/Internals.java	Tue Aug 07 19:14:53 2012 +0200
@@ -246,8 +246,10 @@
 	 * @see http://www.selenic.com/mercurial/hgrc.5.html
 	 */
 	public ConfigFile readConfiguration(HgRepository hgRepo, File repoRoot) throws IOException {
-		ConfigFile configFile = new ConfigFile();
-		File hgInstallRoot = findHgInstallRoot(HgInternals.getContext(hgRepo)); // may be null
+		// XXX Internals now have sessionContext field, is there real need to extract one from the repo?
+		SessionContext sessionCtx = HgInternals.getContext(hgRepo);
+		ConfigFile configFile = new ConfigFile(sessionCtx);
+		File hgInstallRoot = findHgInstallRoot(sessionCtx); // may be null
 		//
 		if (runningOnWindows()) {
 			if (hgInstallRoot != null) {