Remove the notion of ImmediateCompletion

This commit is contained in:
Vincent Jacques
2012-05-30 19:00:37 +02:00
parent 7a622975d6
commit 12d427464f
48 changed files with 189 additions and 227 deletions
+5 -5
View File
@@ -8,7 +8,7 @@ import GitCommit
import GitTree
class GitCommit( object ):
def __init__( self, requester, attributes, completion ):
def __init__( self, requester, attributes, completed ):
self.__requester = requester
self.__initAttributes()
self.__useAttributes( attributes )
@@ -53,17 +53,17 @@ class GitCommit( object ):
def __useAttributes( self, attributes ):
if "author" in attributes and attributes[ "author" ] is not None: # pragma no branch
assert isinstance( attributes[ "author" ], dict ), attributes[ "author" ]
self.__author = GitAuthor.GitAuthor( self.__requester, attributes[ "author" ], completion = LazyCompletion )
self.__author = GitAuthor.GitAuthor( self.__requester, attributes[ "author" ], completed = False )
if "committer" in attributes and attributes[ "committer" ] is not None: # pragma no branch
assert isinstance( attributes[ "committer" ], dict ), attributes[ "committer" ]
self.__committer = GitAuthor.GitAuthor( self.__requester, attributes[ "committer" ], completion = LazyCompletion )
self.__committer = GitAuthor.GitAuthor( self.__requester, attributes[ "committer" ], completed = False )
if "message" in attributes and attributes[ "message" ] is not None: # pragma no branch
assert isinstance( attributes[ "message" ], ( str, unicode ) ), attributes[ "message" ]
self.__message = attributes[ "message" ]
if "parents" in attributes and attributes[ "parents" ] is not None: # pragma no branch
assert all( isinstance( element, dict ) for element in attributes[ "parents" ] ), attributes[ "parents" ]
self.__parents = [
GitCommit( self.__requester, element, completion = LazyCompletion )
GitCommit( self.__requester, element, completed = False )
for element in attributes[ "parents" ]
]
if "sha" in attributes and attributes[ "sha" ] is not None: # pragma no branch
@@ -71,7 +71,7 @@ class GitCommit( object ):
self.__sha = attributes[ "sha" ]
if "tree" in attributes and attributes[ "tree" ] is not None: # pragma no branch
assert isinstance( attributes[ "tree" ], dict ), attributes[ "tree" ]
self.__tree = GitTree.GitTree( self.__requester, attributes[ "tree" ], completion = LazyCompletion )
self.__tree = GitTree.GitTree( self.__requester, attributes[ "tree" ], completed = False )
if "url" in attributes and attributes[ "url" ] is not None: # pragma no branch
assert isinstance( attributes[ "url" ], ( str, unicode ) ), attributes[ "url" ]
self.__url = attributes[ "url" ]