diff src/org/tmatesoft/hg/internal/BasicSessionContext.java @ 338:3cfa4d908fc9

Add options to control DataAccessProvider, allow to turn off use of file memory mapping in particular to solve potential sharing violation (os file handle gets released on MappedByteByffer being GC'd, not on FileChannel.close())
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Tue, 15 Nov 2011 04:47:03 +0100
parents 981f9f50bb6c
children b015f3918120
line wrap: on
line diff
--- a/src/org/tmatesoft/hg/internal/BasicSessionContext.java	Tue Nov 15 03:07:28 2011 +0100
+++ b/src/org/tmatesoft/hg/internal/BasicSessionContext.java	Tue Nov 15 04:47:03 2011 +0100
@@ -48,4 +48,8 @@
 		return logFacility;
 	}
 
+	public Object getProperty(String name, Object defaultValue) {
+		String value = System.getProperty(name);
+		return value == null ? defaultValue : value;
+	}
 }