@@ -58,7 +58,8 @@ def add_progress(kwargs, git, progress):
58
58
59
59
#} END utilities
60
60
61
- def progress_object (progress ):
61
+
62
+ def to_progress_instance (progress ):
62
63
"""Given the 'progress' return a suitable object derived from
63
64
RemoteProgress().
64
65
"""
@@ -552,9 +553,8 @@ def update(self, **kwargs):
552
553
self .repo .git .remote (scmd , self .name , ** kwargs )
553
554
return self
554
555
555
-
556
556
def _get_fetch_info_from_stderr (self , proc , progress ):
557
- progress = progress_object (progress )
557
+ progress = to_progress_instance (progress )
558
558
559
559
# skip first line as it is some remote info we are not interested in
560
560
output = IterableList ('name' )
@@ -610,7 +610,7 @@ def _get_fetch_info_from_stderr(self, proc, progress):
610
610
return output
611
611
612
612
def _get_push_info (self , proc , progress ):
613
- progress = progress_object (progress )
613
+ progress = to_progress_instance (progress )
614
614
615
615
# read progress information from stderr
616
616
# we hope stdout can hold all the data, it should ...
@@ -715,26 +715,19 @@ def push(self, refspec=None, progress=None, **kwargs):
715
715
716
716
:param refspec: see 'fetch' method
717
717
:param progress:
718
- If None, progress information will be discarded
719
-
720
- No further progress information is returned after push returns.
721
-
722
- A function (callable) that is called with the progress infomation:
723
-
724
- progress( op_code, cur_count, max_count=None, message='' )
725
-
726
- op_code is a bit mask of values defined in git.RemoteProgress
727
-
728
- cur_count and max_count are float values.
729
-
730
- max_count is None if there is no max_count
731
-
732
- messages is '' if there is no additon message.
733
-
734
- Deprecated: Pass in a class derived from git.RemoteProgres that
735
- overrides the update() function.
736
-
737
-
718
+ Can take one of many value types:
719
+
720
+ * None to discard progress information
721
+ * A function (callable) that is called with the progress infomation.
722
+
723
+ Signature: ``progress(op_code, cur_count, max_count=None, message='')``.
724
+
725
+ `Click here <http://goo.gl/NPa7st>`_ for a description of all arguments
726
+ given to the function.
727
+ * An instance of a class derived from ``git.RemoteProgress`` that
728
+ overrides the ``update()`` function.
729
+
730
+ :note: No further progress information is returned after push returns.
738
731
:param kwargs: Additional arguments to be passed to git-push
739
732
:return:
740
733
IterableList(PushInfo, ...) iterable list of PushInfo instances, each
0 commit comments