Mercurial > jhg
comparison src/org/tmatesoft/hg/repo/HgRepository.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 | 2f9ed6bcefa2 |
comparison
equal
deleted
inserted
replaced
503:0bd2d0441d8f | 504:bf352ce2b97f |
---|---|
35 import org.tmatesoft.hg.internal.ByteArrayChannel; | 35 import org.tmatesoft.hg.internal.ByteArrayChannel; |
36 import org.tmatesoft.hg.internal.ConfigFile; | 36 import org.tmatesoft.hg.internal.ConfigFile; |
37 import org.tmatesoft.hg.internal.Experimental; | 37 import org.tmatesoft.hg.internal.Experimental; |
38 import org.tmatesoft.hg.internal.Filter; | 38 import org.tmatesoft.hg.internal.Filter; |
39 import org.tmatesoft.hg.internal.Internals; | 39 import org.tmatesoft.hg.internal.Internals; |
40 import org.tmatesoft.hg.internal.PropertyMarshal; | |
40 import org.tmatesoft.hg.internal.RevlogStream; | 41 import org.tmatesoft.hg.internal.RevlogStream; |
41 import org.tmatesoft.hg.internal.SubrepoManager; | 42 import org.tmatesoft.hg.internal.SubrepoManager; |
42 import org.tmatesoft.hg.repo.ext.HgExtensionsManager; | 43 import org.tmatesoft.hg.repo.ext.HgExtensionsManager; |
43 import org.tmatesoft.hg.util.CancelledException; | 44 import org.tmatesoft.hg.util.CancelledException; |
44 import org.tmatesoft.hg.util.Pair; | 45 import org.tmatesoft.hg.util.Pair; |
556 } | 557 } |
557 return rv; | 558 return rv; |
558 } | 559 } |
559 | 560 |
560 private int getLockTimeout() { | 561 private int getLockTimeout() { |
561 return getConfiguration().getIntegerValue("ui", "timeout", 600); | 562 int cfgValue = getConfiguration().getIntegerValue("ui", "timeout", 600); |
563 if (getSessionContext().getConfigurationProperty(Internals.CFG_PROPERTY_FS_LOCK_TIMEOUT, null) != null) { | |
564 return new PropertyMarshal(sessionContext).getInt(Internals.CFG_PROPERTY_FS_LOCK_TIMEOUT, cfgValue); | |
565 } | |
566 return cfgValue; | |
562 } | 567 } |
563 } | 568 } |