From 1687283c13caf7ff8d1959591541dff6a171ca1e Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Wed, 17 Nov 2010 22:38:10 +0100 Subject: RootModule.update: initial implementation of update method, which should be able to handle submodule removals, additions, path changes and branch changes. All this still needs to be tested though --- lib/git/util.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'lib/git/util.py') diff --git a/lib/git/util.py b/lib/git/util.py index b77e7904..b7446953 100644 --- a/lib/git/util.py +++ b/lib/git/util.py @@ -316,6 +316,14 @@ class IterableList(list): return getattr(self, index) except AttributeError: raise IndexError( "No item found with id %r" % (self._prefix + index) ) + + def __contains__(self, item): + try: + self[item] + return True + except IndexError: + return False + # END handle exception class Iterable(object): -- cgit v1.2.1