@@ -278,6 +278,10 @@ def iter_items(cls, repo: "Repo", *args: Any, **kwargs: Any) -> NoReturn: # ->
278
278
279
279
280
280
class PushInfoList (IterableList [PushInfo ]):
281
+ """
282
+ IterableList of PushInfo objects.
283
+ """
284
+
281
285
def __new__ (cls ) -> "PushInfoList" :
282
286
return cast (PushInfoList , IterableList .__new__ (cls , "push_infos" ))
283
287
@@ -1004,7 +1008,7 @@ def push(
1004
1008
progress : Union [RemoteProgress , "UpdateProgress" , Callable [..., RemoteProgress ], None ] = None ,
1005
1009
kill_after_timeout : Union [None , float ] = None ,
1006
1010
** kwargs : Any ,
1007
- ) -> IterableList [ PushInfo ] :
1011
+ ) -> PushInfoList :
1008
1012
"""Push changes from source branch in refspec to target branch in refspec.
1009
1013
1010
1014
:param refspec: see 'fetch' method
@@ -1025,13 +1029,13 @@ def push(
1025
1029
should be killed. It is set to None by default.
1026
1030
:param kwargs: Additional arguments to be passed to git-push
1027
1031
:return:
1028
- list(PushInfo, ...) list of PushInfo instances, each
1029
- one informing about an individual head which had been updated on the remote
1030
- side.
1032
+ A ``PushInfoList`` object, where each list member
1033
+ represents an individual head which had been updated on the remote side.
1031
1034
If the push contains rejected heads, these will have the PushInfo.ERROR bit set
1032
1035
in their flags.
1033
- If the operation fails completely, the length of the returned IterableList will
1034
- be 0."""
1036
+ If the operation fails completely, the length of the returned PushInfoList will
1037
+ be 0.
1038
+ Call ``.raise_if_error()`` on the returned object to raise on any failure."""
1035
1039
kwargs = add_progress (kwargs , self .repo .git , progress )
1036
1040
proc = self .repo .git .push (
1037
1041
"--" ,
0 commit comments