-=[ Mr. Bumblebee ]=-
_Indonesia_

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

ó
Ì\,Tc@s‘dZddlZddlZddlmZdZddlmZd„Zd„Z	d„Z
d	efd
„ƒYZdad„Zd„ZdS(
sKshow progress bars for some actions

This extension uses the progress information logged by hg commands
to draw progress bars that are as informative as possible. Some progress
bars only offer indeterminate information, while others have a definite
end point.

The following settings are available::

  [progress]
  delay = 3 # number of seconds (float) before showing the progress bar
  changedelay = 1 # changedelay: minimum delay before showing a new topic.
                  # If set to less than 3 * refresh, that value will
                  # be used instead.
  refresh = 0.1 # time in seconds between refreshes of the progress bar
  format = topic bar number estimate # format of the progress bar
  width = <none> # if set, the maximum width of the progress information
                 # (that is, min(width, term width) will be used)
  clear-complete = True # clear the progress bar after it's done
  disable = False # if true, don't show a progress bar
  assume-tty = False # if true, ALWAYS show a progress bar, unless
                     # disable is given

Valid entries for the format field are topic, bar, number, unit,
estimate, speed, and item. item defaults to the last 20 characters of
the item, but this can be changed by adding either ``-<num>`` which
would take the last num characters, or ``+<num>`` for the first num
characters.
iÿÿÿÿN(t_tinternal(tencodingcGsdjd„|DƒƒS(Nt css|]}|r|VqdS(N((t.0ts((s2/usr/lib/python2.7/dist-packages/hgext/progress.pys	<genexpr>/s(tjoin(targs((s2/usr/lib/python2.7/dist-packages/hgext/progress.pyt	spacejoin.scCs/|jƒo.|jtjƒp.|jddƒS(Ntprogresss
assume-tty(tplaint_isattytsyststderrt
configbool(tui((s2/usr/lib/python2.7/dist-packages/hgext/progress.pytshouldprint1scCsN|dkrtdƒ|S|d}|dkrR||d8}tdƒ||fS|d7}|d}||d8}|dkr”tdƒ||fS|d7}|d}||d8}|dkrÖtd	ƒ||fS|d7}|d
}||d
8}|dkrtdƒ||fS|d7}|d
}||d
8}tdƒ||fS(Ni<s%02dss%dm%02dsiis%dh%02dmiis%dd%02dhii7s%dw%02ddi4s%dy%02dw(R(tsecondstminutesthourstdaystweekstyears((s2/usr/lib/python2.7/dist-packages/hgext/progress.pytfmtremaining5s2








tprogbarcBsbeZd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Z	ddd
d	„ZRS(cCs||_|jƒdS(N(Rt
resetstate(tselfR((s2/usr/lib/python2.7/dist-packages/hgext/progress.pyt__init__[s	cCsóg|_i|_i|_i|_t|_tjƒt|jj	ddddƒƒ|_
d|_d|_
t|jj	ddddƒƒ|_td|jt|jj	dddd	ƒƒƒ|_|jjdd
dddd
dgƒ|_dS(NR	tdelaytdefaultiitrefreshgš™™™™™¹?tchangedelayitformatttopictbartnumbertestimate(ttopicsttopicstatest
starttimest	startvalstFalsetprintedttimetfloatRtconfigt	lastprinttNonet	lasttopict
indetcountRtmaxRt
configlisttorder(R((s2/usr/lib/python2.7/dist-packages/hgext/progress.pyR_s"							
		cCsÂt|jƒsdS|jƒ}t|_d}t}	d}
xó|jD]è}d}|dkre|}n |dkr³|r¤dttt|ƒƒƒd||f}qt|ƒ}nR|j	dƒr|rd}
d|kröt
|jdƒd	ƒ}n4d
|kr$d}
t
|jd
ƒd	ƒ}nd}|
dkrQtj
||d
tƒ}ntj
||ƒ}||tj|ƒd7}n„|dkrœd}t}	ni|dkr·|r·|}nN|dkrÞ|j||||ƒ}n'|dkr|j||||ƒ}n|	st||ƒ}qDt|
|ƒ}
qDW|	ryd}|r\|tj|ƒd	7}n|
r||tj|
ƒd	7}n||d}|ræ||kræ|||}d|d	}|dkrÑ|d7}n|d||7}nf|d8}|jd	7_|jd|}||8}dt
|t|ƒƒddt
t|ƒƒ}djd|dfƒ}t|||
ƒ}nt||
ƒ}tjjdtj
||ƒƒ||_tjjƒdS(NtR!R#s% ss/%stitemtendt-it+t	beginningitleftsideRR"tunitR$tspeediit=t>is<=>t[t]s
(RRtwidthtTrueR*R)R4tstrtlent
startswithtinttsplitRttrimtcolwidthR$R=RR1tabsRRR
twriteR0tflush(RtnowR!tposR6R<ttotalt	termwidththeadtneedprogressttailt	indicatortaddtslicetwidtusedt	progwidthtamtR"tprogtout((s2/usr/lib/python2.7/dist-packages/hgext/progress.pytshowrs‚				


 	cCs5t|jƒsdStjjdd|jƒƒdS(Ns
%s
R(RRRR
RLRB(R((s2/usr/lib/python2.7/dist-packages/hgext/progress.pytclear½scCs\t|jƒsdS|jjdddtƒr;|jƒntjjdƒtjjƒdS(NR	sclear-completeRs
(	RRRRCR_RR
RLRM(R((s2/usr/lib/python2.7/dist-packages/hgext/progress.pytcompleteÂs
cCs7|jjƒ}tt|jjddd|ƒƒ|ƒS(NR	RBR(RRQtminRGR-(Rttw((s2/usr/lib/python2.7/dist-packages/hgext/progress.pyRBËsc
Csœ|dkrdS|j|}||}||}|dkr˜||j|}|t|jjddddƒƒkr˜||||d}	t|	ƒSndS(NR5iR	R$Rii(R/R(R'R,RR-R(
RR!RORPRNt
initialposttargettdeltatelapsedR((s2/usr/lib/python2.7/dist-packages/hgext/progress.pyR$Ïs


!
cCsk|j|}||}||j|}|t|jjddddƒƒkrgtdƒ|||fSdS(NR	R$Ris	%d %s/secR5(R(R'R,RR-R(RR!ROR<RNRcReRf((s2/usr/lib/python2.7/dist-packages/hgext/progress.pyR=Ýs

!R5cCs¸tjƒ}|dkrã|jj|dƒ|jj|dƒ|jj|dƒ|jr|jd|kr|jr|jƒ|j	ƒn||jkr´|j|jj
|ƒ |_|jrÔ|jd|_qàd|_q´nÑ||jkr||j|<||j|<|jj|ƒn||||f|j|<||j
|jkr´|jr´|jdks‹||jks‹||j
|jkr´||_
|j|||j|Œq´ndS(Niiÿÿÿÿ(R+R/R'tpopR(R&R%R*R`RtindexR0tappendR.RRR^(RR!ROR6R<RPRN((s2/usr/lib/python2.7/dist-packages/hgext/progress.pyR	æs0%

	

	N(t__name__t
__module__RRR^R_R`RBR$R=R/R	(((s2/usr/lib/python2.7/dist-packages/hgext/progress.pyRZs			K							cs•d|jf‡fd†ƒY‰|jddƒr5dSt|ƒr‘|jr‘|jr‘ˆ|_ˆjs‘tdkr‚t|ƒantˆ_q‘ndS(Nt
progressuicsDeZdZd„Z‡fd†Z‡fd†Z‡fd†ZRS(cSs|jp|jS(N(t	debugflagtquiet(R((s2/usr/lib/python2.7/dist-packages/hgext/progress.pyt_quietscs;|jƒs"|jj||Žntˆ|ƒj||ŽS(N(Rot_progbarR	tsuper(RRtopts(Rl(s2/usr/lib/python2.7/dist-packages/hgext/progress.pyR	scsB|jƒr)|jjr)|jjƒntˆ|ƒj||ŽS(N(RoRpR*R_RqRL(RRRr(Rl(s2/usr/lib/python2.7/dist-packages/hgext/progress.pyRLscsB|jƒr)|jjr)|jjƒntˆ|ƒj||ŽS(N(RoRpR*R_Rqt	write_err(RRRr(Rl(s2/usr/lib/python2.7/dist-packages/hgext/progress.pyRssN(RjRkR/RpRoR	RLRs((Rl(s2/usr/lib/python2.7/dist-packages/hgext/progress.pyRls
	R	tdisable(	t	__class__RRRmRnRpt
_singletonR/R(R((Rls2/usr/lib/python2.7/dist-packages/hgext/progress.pytuisetups 		cCst|jƒdS(N(RwR(Rtrepo((s2/usr/lib/python2.7/dist-packages/hgext/progress.pyt	reposetup0s(t__doc__RR+tmercurial.i18nRt
testedwitht	mercurialRRRRtobjectRR/RvRwRy(((s2/usr/lib/python2.7/dist-packages/hgext/progress.pyt<module>$s			%°	$

Copyright © 2017 || Recoded By Mr.Bumblebee