diff src/org/tmatesoft/hg/internal/Internals.java @ 504:bf352ce2b97f

Allow to override lock timeout from within Hg4J
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Fri, 30 Nov 2012 21:58:00 +0100
parents d2f6ab541330
children 0be5be8d57e9
line wrap: on
line diff
--- a/src/org/tmatesoft/hg/internal/Internals.java	Wed Oct 31 15:17:21 2012 +0100
+++ b/src/org/tmatesoft/hg/internal/Internals.java	Fri Nov 30 21:58:00 2012 +0100
@@ -73,6 +73,19 @@
 	 */
 	public static final String CFG_PROPERTY_FS_FILENAME_ENCODING = "hg.fs.filename.encoding";
 	
+	/**
+	 * Timeout, in seconds, to acquire filesystem {@link HgRepositoryLock lock}.
+	 * 
+	 * Mercurial provides 'ui.timeout' in hgrc (defaults to 600 seconds) to specify how long 
+	 * it shall try to acquire a lock for storage or working directory prior to fail.
+	 *  
+	 * This configuration property allows to override timeout value from Mercurial's configuration
+	 * file and use Hg4J-specific value instead. 
+	 * 
+	 * Integer value, use negative for attempts to acquire lock until success, and zero to try once and fail immediately. 
+	 */
+	public static final String CFG_PROPERTY_FS_LOCK_TIMEOUT = "hg4j.fs.lock.timeout";
+	
 	private List<Filter.Factory> filterFactories;
 	private final HgRepository repo;
 	private final File repoDir;