-=[ Mr. Bumblebee ]=-
_Indonesia_

Path : /usr/lib/python2.7/dist-packages/bzrlib/
File Upload :
Current File : //usr/lib/python2.7/dist-packages/bzrlib/progress.pyc

ó
ûWžOc@@s˜dZddlmZddlZddlZd„Zdefd„ƒYZdefd„ƒYZd	„Z	d
ddd„Zd
efd„ƒYZdS(s›Progress indicators.

The usual way to use this is via bzrlib.ui.ui_factory.nested_progress_bar which
will manage a conceptual stack of nested activities.
i(tabsolute_importNcC@sOt|ddƒ}|dkr"tS|ƒs/tStjjdƒdkrKtStS(sÿDetect if we can use pretty progress bars on file F.

    If this returns true we expect that a human may be looking at that
    output, and that we can repaint a line to update it.

    This doesn't check the policy for whether we *should* use them.
    tisattytTERMtdumbN(tgetattrtNonetFalsetostenvirontgettTrue(tfR((s3/usr/lib/python2.7/dist-packages/bzrlib/progress.pyt_supports_progresss	tProgressTaskcB@sheZdZd
d
d
d„Zd„Zd
d
d„Zd„Zd„Zd„Z	dd„Z
d	„ZRS(srModel component of a progress indicator.

    Most code that needs to indicate progress should update one of these,
    and it will in turn update the display, if one is present.

    Code updating the task may also set fields as hints about how to display
    it: show_pct, show_spinner, show_eta, show_count, show_bar.  UIs
    will not necessarily respect all these fields.

    The message given when updating a task must be unicode, not bytes.

    :ivar update_latency: The interval (in seconds) at which the PB should be
        updated.  Setting this to zero suggests every update should be shown
        synchronously.

    :ivar show_transport_activity: If true (default), transport activity
        will be shown when this task is drawn.  Disable it if you're sure 
        that only irrelevant or uninteresting transport activity can occur
        during this task.
    cC@s…||_d|_d|_d|_d|_||_||_t|_	t
|_tf|_t
|_
t
|_d|_t
|_dS(s©Construct a new progress task.

        :param parent_task: Enclosing ProgressTask or None.

        :param progress_view: ProgressView to display this ProgressTask.

        :param ui_factory: The UI factory that will display updates; 
            deprecated in favor of passing progress_view directly.

        Normally you should not call this directly but rather through
        `ui_factory.nested_progress_bar`.
        itgš™™™™™¹?N(t_parent_taskt_last_updateRt	total_cnttcurrent_cnttmsgt
ui_factoryt
progress_viewRtshow_pctR
tshow_spinnertshow_etat
show_counttshow_bartupdate_latencytshow_transport_activity(tselftparent_taskRR((s3/usr/lib/python2.7/dist-packages/bzrlib/progress.pyt__init__Js
												cC@s#d|jj|j|j|jfS(Ns%s(%r/%r, msg=%r)(t	__class__t__name__RRR(R((s3/usr/lib/python2.7/dist-packages/bzrlib/progress.pyt__repr__gs
	cC@sT||_||_|r$||_n|jr@|jj|ƒn|jj|ƒdS(s…Report updated task message and if relevent progress counters

        The message given must be unicode, not a byte string.
        N(RRRRt
show_progressRt_progress_updated(RRRR((s3/usr/lib/python2.7/dist-packages/bzrlib/progress.pytupdatens			cC@s|j|jƒdS(N(R%R(R((s3/usr/lib/python2.7/dist-packages/bzrlib/progress.pyttick|scC@s0|jr|jj|ƒn|jj|ƒdS(N(Rt
task_finishedRt_progress_finished(R((s3/usr/lib/python2.7/dist-packages/bzrlib/progress.pytfinisheds	cC@st|d|jd|jƒS(NRR(R
RR(R((s3/usr/lib/python2.7/dist-packages/bzrlib/progress.pyt
make_sub_task…sgcC@sw|jdk	r5|jr5t|jƒ||j}n|}|jdkrN|S|dkrcd}n|jj|ƒSdS(sqReturn fractional completion of this task and its parents

        Returns None if no completion can be computed.gN(RRRtfloatRt_overall_completion_fraction(Rtchild_fractiontown_fraction((s3/usr/lib/python2.7/dist-packages/bzrlib/progress.pyR,‰s	cC@s*|jr|jjƒn
|jjƒdS(N(RtclearRt
clear_term(R((s3/usr/lib/python2.7/dist-packages/bzrlib/progress.pyR/šs	N(R!t
__module__t__doc__RRR"R%R&R)R*R,R/(((s3/usr/lib/python2.7/dist-packages/bzrlib/progress.pyR
4s				t
DummyProgresscB@sDeZdZd„Zdddd„Zd„Zd„Zd„ZRS(sVProgress-bar standin that does nothing.

    This was previously often constructed by application code if no progress
    bar was explicitly passed in.  That's no longer recommended: instead, just
    create a progress task from the ui_factory.  This class can be used in
    test code that needs to fake a progress task for some reason.
    cC@sdS(N((R((s3/usr/lib/python2.7/dist-packages/bzrlib/progress.pyR&±scC@sdS(N((RRtcurrentttotal((s3/usr/lib/python2.7/dist-packages/bzrlib/progress.pyR%´scC@sdS(N((RtmessageR4R5((s3/usr/lib/python2.7/dist-packages/bzrlib/progress.pytchild_update·scC@sdS(N((R((s3/usr/lib/python2.7/dist-packages/bzrlib/progress.pyR/ºscK@s
t|S(N(R3(Rtkwargs((s3/usr/lib/python2.7/dist-packages/bzrlib/progress.pytchild_progress½sN(	R!R1R2R&RR%R7R/R9(((s3/usr/lib/python2.7/dist-packages/bzrlib/progress.pyR3¨s			cC@sC|dkrdStt|ƒƒ}d|d|dd|dfS(Ns-:--:--s%d:%02d:%02dii<(Rtinttround(tdelt((s3/usr/lib/python2.7/dist-packages/bzrlib/progress.pyt
str_tdeltaÁs
ii
cC@sÚ|dkrdS|sdS||kr*dS||kr:dStjƒ|}|dkrZdSt|ƒt|ƒt|ƒ}|rÒt|ƒ|krÒt|ƒtt|ƒƒ}|||}	||}
|	|
dS||S(Ng@i(RttimeR+tlentsum(t
start_timeR4R5tenough_samplestlast_updatestn_recenttelapsedttotal_durationtavgt	time_leftt
old_time_left((s3/usr/lib/python2.7/dist-packages/bzrlib/progress.pytget_etaÊs$ 
t
ProgressPhasecB@s eZdZd„Zd„ZRS(s-Update progress object with the current phasecC@s5tj|ƒ||_||_||_d|_dS(N(tobjectRtpbR6R5Rt	cur_phase(RR6R5RM((s3/usr/lib/python2.7/dist-packages/bzrlib/progress.pyRìs

			cC@sM|jdkrd|_n|jd7_|jj|j|j|jƒdS(Nii(RNRRMR%R6R5(R((s3/usr/lib/python2.7/dist-packages/bzrlib/progress.pyt
next_phaseós(R!R1R2RRO(((s3/usr/lib/python2.7/dist-packages/bzrlib/progress.pyRKês	(
R2t
__future__RR>RRRLR
R3R=RRJRK(((s3/usr/lib/python2.7/dist-packages/bzrlib/progress.pyt<module>s	t		 

Copyright © 2017 || Recoded By Mr.Bumblebee