From dcf2c3bd2aaf76e2b6e0cc92f838688712ebda6c Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Thu, 17 Dec 2009 12:20:37 +0100 Subject: config: GitConfigReader now allows to override its lock-type. By default it uses a 'failing' lock file, but now its possible to easily put a blocking lock file in its place --- lib/git/config.py | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) (limited to 'lib/git/config.py') diff --git a/lib/git/config.py b/lib/git/config.py index 7a09a63c..6228ebfa 100644 --- a/lib/git/config.py +++ b/lib/git/config.py @@ -72,7 +72,7 @@ def _set_dirty_and_flush_changes(non_const_func): -class GitConfigParser(cp.RawConfigParser, LockFile): +class GitConfigParser(cp.RawConfigParser, object): """ Implements specifics required to read git style configuration files. @@ -91,6 +91,15 @@ class GitConfigParser(cp.RawConfigParser, LockFile): """ __metaclass__ = _MetaParserBuilder + + #{ Configuration + # The lock type determines the type of lock to use in new configuration readers. + # They must be compatible to the LockFile interface. + # A suitable alternative would be the BlockingLockFile + t_lock = LockFile + + #} END configuration + OPTCRE = re.compile( r'\s?(?P