diff src/org/tmatesoft/hg/repo/HgRemoteRepository.java @ 407:30922c728341 smartgit3

Better multiline log printout; options to tune default log output
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Fri, 16 Mar 2012 12:51:03 +0100
parents 994b5813a925
children bb278ccf9866
line wrap: on
line diff
--- a/src/org/tmatesoft/hg/repo/HgRemoteRepository.java	Mon Mar 05 15:15:49 2012 +0100
+++ b/src/org/tmatesoft/hg/repo/HgRemoteRepository.java	Fri Mar 16 12:51:03 2012 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011 TMate Software Ltd
+ * Copyright (c) 2011-2012 TMate Software Ltd
  *  
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -66,7 +66,7 @@
 	private final URL url;
 	private final SSLContext sslContext;
 	private final String authInfo;
-	private final boolean debug = Boolean.parseBoolean(System.getProperty("hg4j.remote.debug"));
+	private final boolean debug;
 	private HgLookup lookupHelper;
 	private final SessionContext sessionContext;
 
@@ -76,6 +76,8 @@
 		}
 		this.url = url;
 		sessionContext = ctx;
+		Object debugProp = ctx.getProperty("hg4j.remote.debug", false);
+		debug = debugProp instanceof Boolean ? ((Boolean) debugProp).booleanValue() : Boolean.parseBoolean(String.valueOf(debugProp));
 		if ("https".equals(url.getProtocol())) {
 			try {
 				sslContext = SSLContext.getInstance("SSL");