-=[ Mr. Bumblebee ]=-
_Indonesia_

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


LBOc@@sddlmZdgZddlmZddlZddlZddlmZm	Z	m
Z
mZm
Z
mZddlmZmZmZmZddlmZddd	Zd
efdYZdddddZd
ZdZdZdZddddddZdddddZ dZ!dZ"dZ#dZ$dZ%dZ&e'ddZ(dddddZ)dddddZ*dZ+dej,fdYZ-e-ZdS( i(tabsolute_importtshow_bzrdir_info(tStringION(tbzrdirt
controldirterrorsthookstosutilsturlutils(t
NoWorkingTreetNotBranchErrortNoRepositoryPresenttNotLocalUrl(t
find_unmergedtcC@s(|dkr|S|dk	r |SdSdS(Nits(tNone(tntbasetpl((s//usr/lib/python2.7/dist-packages/bzrlib/info.pytplural&s
tLocationListcB@s,eZdZdZdZdZRS(cC@sg|_||_dS(N(tlocst	base_path(tselfR((s//usr/lib/python2.7/dist-packages/bzrlib/info.pyt__init__1s	cC@sd|dkrdSytj|}Wn*tjk
rO|jj||fnX|j||dS(s:Add a URL to the list, converting it to a path if possibleN(RRtlocal_path_from_urlRt
InvalidURLRtappendtadd_path(Rtlabelturltpath((s//usr/lib/python2.7/dist-packages/bzrlib/info.pytadd_url5scC@s}ytj|j|}Wntjk
r/nX|dkrEd}n|dkrc|jd}n|jj||fdS(s8Add a path, converting it to a relative path if possibleRt.t/N(RtrelpathRRtPathNotChildtrstripRR(RRR ((s//usr/lib/python2.7/dist-packages/bzrlib/info.pyR@s	cC@sFtd|jD}g|jD]\}}d|||f^q#S(Ncs@s!|]\}}t|VqdS(N(tlen(t.0tltu((s//usr/lib/python2.7/dist-packages/bzrlib/info.pys	<genexpr>Nss
  %*s: %s
(tmaxR(Rtmax_lenR)R*((s//usr/lib/python2.7/dist-packages/bzrlib/info.pyt	get_linesMs(t__name__t
__module__RR!RR-(((s//usr/lib/python2.7/dist-packages/bzrlib/info.pyR/s			
c

C@sSi}|dk	r?|j}|j}|dkr|}qnOd}d}y/|dk	ry|jry|j|d<nWntk
rnX|r6|j}||kr||d<n||kr|jr||d<q||d<n||kr||d<q|jr||d<q|dk	r||d<qnd}|dk	rp|jrp|dk	r||d<qnQ|dk	r||d<n8|dk	r|j|d<n|dk	r|j|d<n||kr||d	<n|dk	r|jr|j|d
<ndddddd
dddd	g
}g|D]"}	|	|kr-|	||	f^q-S(Nscheckout of branchslight checkout rootsrepository checkout roots
checkout rootsrepository branchsbranch roott
repositoryscontrol directorysbound to branchsshared repository(Rtuser_urltget_bound_locationtget_branch_referenceR
t	is_shared(
R0tbranchtworkingtcontrolRtbranch_pathtmaster_pathtworking_pathtorderR((s//usr/lib/python2.7/dist-packages/bzrlib/info.pytgather_location_infoRs^	
	






		cC@s]|jdttj}x$|D]\}}|j||q&W|j|jdS(s8Show known locations for working, branch and repository.s
Location:
N(twriteRRtgetcwdR!t
writelinesR-(Rtoutfilet	path_listtnametloc((s//usr/lib/python2.7/dist-packages/bzrlib/info.pyt_show_location_infos

cC@sttj}|jd|j|jd|j|jd|j|jd|jy|jd|jWn#t	j
t	jt	jfk
rnX|S(Ns
public branchspush branchs
parent branchs
submit branchs
stacked on(
RRR>R!tget_public_branchtget_push_locationt
get_parenttget_submit_branchtget_stacked_on_urlRtUnstackableBranchFormattUnstackableRepositoryFormatt
NotStacked(R5R((s//usr/lib/python2.7/dist-packages/bzrlib/info.pyt_gather_related_branchess
cC@sUt|}t|jdkrQ|jd|jd|j|jndS(s(Show parent and push location of branch.is
sRelated branches:
N(RMR'RR=R?R-(R5R@R((s//usr/lib/python2.7/dist-packages/bzrlib/info.pyt_show_related_infos


cC@sJ|jjrF|jd|jd|jdt|jndS(sShow control dir information.s
sControl directory:
s         %d branches
N(t_formattcolocated_branchesR=R't
list_branches(R7R@((s//usr/lib/python2.7/dist-packages/bzrlib/info.pyt_show_control_dir_infos

cC@s|jd|jd|r=|jd|jjn|r`|jd|jjn|r|jd|jjn|r|jd|jjndS(s?Show known formats for control, working, branch and repository.s
sFormat:
s       control: %s
s  working tree: %s
s        branch: %s
s    repository: %s
N(R=ROtget_format_description(R7R0R5R6R@((s//usr/lib/python2.7/dist-packages/bzrlib/info.pyt_show_format_infos

				cC@s|r|js6|r$|js6|r|jr|jd|jd|r|jrkd}nd}|jd|n|r|jrd}nd}|jd|n|r|jrd}nd}|jd|qndS(	s6Show locking status of working, branch and repository.s
s
Lock status:
tlockedtunlockeds  working tree: %s
s        branch: %s
s    repository: %s
N(tget_physical_lock_statusR=(R0R5R6R@tstatus((s//usr/lib/python2.7/dist-packages/bzrlib/info.pyt_show_locking_infos(

			cC@sm|j}|rit||\}}|ri|jd|jdt|tt|fqindS(s(Show missing master revisions in branch.s
s.Branch is out of date: missing %d revision%s.
N(tget_master_branchR
R=R'R(R5R@tmastertlocal_extratremote_extra((s//usr/lib/python2.7/dist-packages/bzrlib/info.pyt_show_missing_revisions_branchs
		c	C@s|j}|j}y|j\}}Wntjk
rBdSXy|jd}Wntk
rpd}nX|r||kr|j|}||}|j	d|j	d|t
|fndS(s'Show missing revisions in working tree.Nis
s4Working tree is out of date: missing %d revision%s.
(R5t
basis_treetlast_revision_infoRtUnsupportedOperationtget_parent_idst
IndexErrorRtrevision_id_to_revnoR=R(	R6R@R5tbasistbranch_revnotbranch_last_revisionttree_last_idttree_last_revnot
missing_count((s//usr/lib/python2.7/dist-packages/bzrlib/info.pyt_show_missing_revisions_workings 	



	c
C@s|j}|j|dt}|jd|jd|jdt|j|jdt|j|jdt|j|jdt|j|jdt|j	d	}}x:|j
D],}|j|r|d
7}q|d
7}qW|jd||jd|d	}|j}xE|j
D]7\}}	|	jd
krE|	j|krE|d
7}qEqEW|jd|t|ddfdS(s%Show statistics about a working tree.twant_unchangeds
sIn the working tree:
s  %8s unchanged
s  %8d modified
s  %8d added
s  %8d removed
s  %8d renamed
iis  %8d unknown
s  %8d ignored
t	directorys  %8d versioned %s
tsubdirectorytsubdirectoriesN(R_tchanges_fromtTrueR=R't	unchangedtmodifiedtaddedtremovedtrenamedtextrast
is_ignoredtget_root_idtiter_entries_by_dirtkindtfile_idR(
R6R@Retdeltat
ignore_cnttunknown_cntR tdir_cnttroot_idtentry((s//usr/lib/python2.7/dist-packages/bzrlib/info.pyt_show_working_stats	s.



c
C@sOy|j\}}Wntjk
r-iSX|jd|jd|jd|t|f|jj|d|}|r|d}|jd|t|fn|rK|d\}}ttj|dd}	|jd	|	t|	f|jd
t	j
|||d\}}|jdt	j
||n|S(
sShow statistics about a branch.s
sBranch history:
s  %8d revision%s
t
committerss  %8d committer%s
tfirstreviis  %8d day%s old
s   first revision: %s
t	latestrevs  latest revision: %s
(R`RRaR=RR0tgather_statstintttimeRtformat_date(
R5tverboseR@trevnotheadtstatsRt	timestampttimezonetage((s//usr/lib/python2.7/dist-packages/bzrlib/info.pyt_show_branch_stats(s,


		cC@s-|jr)|jd|jdndS(sShow settings of a repository.s
s<Create working tree for new branches inside the repository.
N(tmake_working_treesR=(R0R@((s//usr/lib/python2.7/dist-packages/bzrlib/info.pyt_show_repository_infoBs
cC@st}d|kr?|d}|jd|t|fnd|krg|jd|ddnx"tdD]}||||qrW|jdkr|jd|jd	|j|jnd
S(s#Show statistics about a repository.t	revisionss  %8d revision%s
tsizes
  %8d KiB
iR0Rs
sRepository:
N(RR=RRtgetvalue(R0RR@tfRthook((s//usr/lib/python2.7/dist-packages/bzrlib/info.pyt_show_repository_statsJs	
 

cC@s5|dkrtj}ny|jdt}Wntttfk
rd}y|jdd}WnMtk
rd}y|j	}Wnt
k
rd}d}qX|}qX|j}|}nX|j}|j}|}|dk	r|j
nzt||||||Wd|dk	r0|jnXdS(s)Output to stdout the 'info' for a_bzrdir.trecommend_upgradeRBRN(Rtsyststdouttopen_workingtreetFalseR	RR
topen_branchtopen_repositoryRR0R5t	lock_readtshow_component_infotunlock(ta_bzrdirRR@ttreeR5R0tlockable((s//usr/lib/python2.7/dist-packages/bzrlib/info.pyRZs:	




	
		
ic

C@s
|d	krtj}n|tkr-d}n|tkrBd}nt||||}t||||}|jd||ftt	d|d|d|d|||d	k	rt
||n|dkrd	St|||||t||||t
|||d	k	r)t||n|d	k	rRt||t||n|d	k	rnt||n|d	k	r|dk}t|||}	n|d	k	r|j}	n|d	kr|d	kr|d	k	rt||n|d	k	r	t||	|nd	S(
s0Write info about all bzrdir components to stdoutiis%s (format: %s)
R7R0R5R6iN(RRRRRqtdescribe_layouttdescribe_formatR=RDR<RNRTRYRRR^RkRRRRR(
R7R0R5R6RR@tlayouttformattshow_committersR((s//usr/lib/python2.7/dist-packages/bzrlib/info.pyRsH		

$cC@s|dkrO|dk	rOy|j}Wntk
r;qOX|dk	rOdSn|dkr_dS|dkr|dkr|jrd}nd}g}|jr|jdnt|jdkr|jdn|r|dd	j|7}n|S|jrd
}nd}|dk	r0d}nd
}|dkrW|dk	rWd}nr|dk	r|j	|j	krd}d}nE|j
dk	r|dkrd}n|dkrd}qd}n|dkr|j}nd||fSdS(sConvert a control directory layout into a user-understandable term

    Common outputs include "Standalone tree", "Repository branch" and
    "Checkout".  Uncommon outputs include "Unshared repository with trees"
    and "Empty control directory"
    sDangling branch referencesEmpty control directorysShared repositorysUnshared repositoryttreesiscolocated branchess with s and sRepository sStandalone RR5sbranchless treeRsLightweight checkoutsBound branchtCheckouts%s%sN(RR3R
R4RRR'tget_branchestjoinR1R2tlower(R0R5RR7tbranch_referencetphrasetextratindependence((s//usr/lib/python2.7/dist-packages/bzrlib/info.pyRsT
								c
C@sg}|dk	r?|dk	r?|j|jkr?d}d}nttjj}|jtjjx|D]}tjj|}t	|t
jr|r|j|j
krqqn|r|j|j
krqqn|r|j|j
krqqqn|j|j
jk	rqqn|j|qqWt|dkr=dS|jg|D]!}tjj|jsN|^qN}	t|	dkr|	}ndj|S(sDetermine the format of an existing control directory

    Several candidates may be found.  If so, the names are returned as a
    single string, separated by ' or '.

    If no matching candidate is found, "unnamed" is returned.
    itunnameds or N(RR1tsetRtformat_registrytkeystdifference_updatetaliasestmake_bzrdirt
isinstanceRtBzrDirMetaFormat1tworkingtree_formatROtget_branch_formattrepository_formatt	__class__RR'tsorttget_infothiddenR(
R7R0R5Rt
candidatestnon_aliasestkeyRtctnew_candidates((s//usr/lib/python2.7/dist-packages/bzrlib/info.pyRs<	
	

!	t	InfoHookscB@seZdZdZRS(sHooks for the info command.cC@s0tt|jdd|jddddS(Nsbzrlib.infoRR0sInvoked when displaying the statistics for a repository. repository is called with a statistics dictionary as returned by the repository and a file-like object to write to.ii(ii(tsuperRRtadd_hook(R((s//usr/lib/python2.7/dist-packages/bzrlib/info.pyRs	(R.R/t__doc__R(((s//usr/lib/python2.7/dist-packages/bzrlib/info.pyRs(.t
__future__Rt__all__t	cStringIORRRtbzrlibRRRRt
_mod_hooksRRt
bzrlib.errorsR	R
RRtbzrlib.missingR
RRtobjectRR<RDRMRNRRRTRYR^RkRRRRRRRRRtHooksR(((s//usr/lib/python2.7/dist-packages/bzrlib/info.pyt<module>s@	."	#	=									
					&(:	+

Copyright © 2017 || Recoded By Mr.Bumblebee