diff options
author | Sebastian Thiel <byronimo@gmail.com> | 2010-11-16 00:18:13 +0100 |
---|---|---|
committer | Sebastian Thiel <byronimo@gmail.com> | 2010-11-16 00:26:27 +0100 |
commit | d4fd7fca515ba9b088a7c811292f76f47d16cd7b (patch) | |
tree | 9361f534520c837d8753da7b8cf2340dd384a3ab /lib/git/config.py | |
parent | ceee7d7e0d98db12067744ac3cd0ab3a49602457 (diff) | |
download | gitpython-d4fd7fca515ba9b088a7c811292f76f47d16cd7b.tar.gz |
Submodule now only supports branches to be given as hint that will svn-external like behaviour. Implemented first version of update, which works for now, but probably needs to see more features
Diffstat (limited to 'lib/git/config.py')
-rw-r--r-- | lib/git/config.py | 30 |
1 files changed, 17 insertions, 13 deletions
diff --git a/lib/git/config.py b/lib/git/config.py index 8541dc0e..073efd63 100644 --- a/lib/git/config.py +++ b/lib/git/config.py @@ -23,19 +23,23 @@ class MetaParserBuilder(type): """ Equip all base-class methods with a needs_values decorator, and all non-const methods with a set_dirty_and_flush_changes decorator in addition to that.""" - mutating_methods = clsdict['_mutating_methods_'] - for base in bases: - methods = ( t for t in inspect.getmembers(base, inspect.ismethod) if not t[0].startswith("_") ) - for name, method in methods: - if name in clsdict: - continue - method_with_values = needs_values(method) - if name in mutating_methods: - method_with_values = set_dirty_and_flush_changes(method_with_values) - # END mutating methods handling - - clsdict[name] = method_with_values - # END for each base + kmm = '_mutating_methods_' + if kmm in clsdict: + mutating_methods = clsdict[kmm] + for base in bases: + methods = ( t for t in inspect.getmembers(base, inspect.ismethod) if not t[0].startswith("_") ) + for name, method in methods: + if name in clsdict: + continue + method_with_values = needs_values(method) + if name in mutating_methods: + method_with_values = set_dirty_and_flush_changes(method_with_values) + # END mutating methods handling + + clsdict[name] = method_with_values + # END for each name/method pair + # END for each base + # END if mutating methods configuration is set new_type = super(MetaParserBuilder, metacls).__new__(metacls, name, bases, clsdict) return new_type |