diff src/org/tmatesoft/hg/internal/ConfigFile.java @ 487:db48a77ec8ff

Access to reposiotry lock mechanism via HgRepositoryLock
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Mon, 13 Aug 2012 18:11:47 +0200
parents e31e85cf4d4c
children 0205a5c4566b
line wrap: on
line diff
--- a/src/org/tmatesoft/hg/internal/ConfigFile.java	Fri Aug 10 21:03:03 2012 +0200
+++ b/src/org/tmatesoft/hg/internal/ConfigFile.java	Mon Aug 13 18:11:47 2012 +0200
@@ -91,6 +91,11 @@
 		return value == null ? defaultValue : value;
 	}
 	
+	public int getInteger(String sectionName, String key, int defaultValue) {
+		String value = getSection(sectionName).get(key);
+		return value == null ? defaultValue : Integer.parseInt(value);
+	}
+	
 	public void putString(String sectionName, String key, String newValue) {
 		Map<String, String> section = null;
 		if (sections == null) {