Test attributes of GitTree (needs a manual change in url in Repository.get_git_tree)

This commit is contained in:
Vincent Jacques
2012-05-09 18:13:28 +02:00
parent 114db51fe7
commit 5e4cfeda7f
8 changed files with 34 additions and 20 deletions
-8
View File
@@ -17,11 +17,6 @@ class GitTree( object ):
if not lazy:
self.__complete()
@property
def recursive( self ):
self.__completeIfNeeded( self.__recursive )
return self.__recursive
@property
def sha( self ):
self.__completeIfNeeded( self.__sha )
@@ -38,7 +33,6 @@ class GitTree( object ):
return self.__url
def __initAttributes( self ):
self.__recursive = None
self.__sha = None
self.__tree = None
self.__url = None
@@ -59,8 +53,6 @@ class GitTree( object ):
def __useAttributes( self, attributes ):
#@todo No need to check if attribute is in attributes when attribute is mandatory
if "recursive" in attributes and attributes[ "recursive" ] is not None:
self.__recursive = attributes[ "recursive" ]
if "sha" in attributes and attributes[ "sha" ] is not None:
self.__sha = attributes[ "sha" ]
if "tree" in attributes and attributes[ "tree" ] is not None:
+1 -1
View File
@@ -594,7 +594,7 @@ class Repository( object ):
def get_git_tree( self, sha, recursive = DefaultValueForOptionalParameters ):
status, headers, data = self.__requester.request(
"GET",
str( self.url ) + "/git_trees" + "/" + str( sha ),
str( self.url ) + "/git/trees" + "/" + str( sha ),
None,
None
)