-=[ Mr. Bumblebee ]=-
_Indonesia_

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


>Oc@@sVddlmZddlmZmZmZmZmZddlm	Z	ddl
mZddlZddl
mZmZmZmZddlmZmZmZmZddlmZmZmZdd	lmZmZmZdd
lmZddl m!Z!ddl"m#Z#d
e$fdYZ%de%fdYZ&de$fdYZ'dS(i(tabsolute_import(tdebugterrorsttracettreetui(tBranch(tOperationWithCleanupsN(tBzrErrortPointlessCommittConflictsInTreetStrictCommitFailed(tget_user_encodingt
is_inside_anytminimum_path_selectiont	splitpath(tmuttertnotetis_quiet(t	InventorytInventoryEntryt
make_entry(tsymbol_versioning(tunescape_for_display(tgettexttNullCommitReportercB@sPeZdZddZdZdZdZdZdZ	dZ
RS(	s!I report on progress of a commit.cC@s)|dkr%tjdtddndS(Ns2As of bzr 1.0 you must pass a location to started.t
stackleveli(tNoneRtwarntDeprecationWarning(tselftrevnotrevidtlocation((s1/usr/lib/python2.7/dist-packages/bzrlib/commit.pytstartedQs
	
cC@sdS(N((Rtchangetpath((s1/usr/lib/python2.7/dist-packages/bzrlib/commit.pytsnapshot_changeXscC@sdS(N((RRtrev_id((s1/usr/lib/python2.7/dist-packages/bzrlib/commit.pyt	completed[scC@sdS(N((RR$((s1/usr/lib/python2.7/dist-packages/bzrlib/commit.pytdeleted^scC@sdS(N((RR$((s1/usr/lib/python2.7/dist-packages/bzrlib/commit.pytmissingascC@sdS(N((RR#told_pathtnew_path((s1/usr/lib/python2.7/dist-packages/bzrlib/commit.pytrenameddscC@stS(N(tFalse(R((s1/usr/lib/python2.7/dist-packages/bzrlib/commit.pyt
is_verbosegsN(t__name__t
__module__t__doc__RR"R%R'R(R)R,R.(((s1/usr/lib/python2.7/dist-packages/bzrlib/commit.pyRNs					tReportCommitToLogcB@sSeZdZdZddZdZdZdZdZ	dZ
RS(	cG@st||dS(sROutput a message.

        Subclasses may choose to override this method.
        N(R(Rtformattargs((s1/usr/lib/python2.7/dist-packages/bzrlib/commit.pyt_notemscC@sE|dkr.|tdtdfkr.dS|jd||dS(Nttaddedtmodifieds%s %s(RR5(RR#R$((s1/usr/lib/python2.7/dist-packages/bzrlib/commit.pyR%ts*cC@sX|dk	r"dt|d}ntjdtddd}|jtd|dS(Ns to: sutf-8s2As of bzr 1.0 you must pass a location to started.RiR6sCommitting%s(RRRRRR5R(RRR&R!((s1/usr/lib/python2.7/dist-packages/bzrlib/commit.pyR"ys	cC@s*|jtd|td||dS(NsCommitted revision %d.sCommitted revid %s as revno %d.(R5RR(RRR&((s1/usr/lib/python2.7/dist-packages/bzrlib/commit.pyR'scC@s|jtd|dS(Ns
deleted %s(R5R(RR$((s1/usr/lib/python2.7/dist-packages/bzrlib/commit.pyR(scC@s|jtd|dS(Ns
missing %s(R5R(RR$((s1/usr/lib/python2.7/dist-packages/bzrlib/commit.pyR)scC@s|jd|||dS(Ns%s %s => %s(R5(RR#R*R+((s1/usr/lib/python2.7/dist-packages/bzrlib/commit.pyR,scC@stS(N(tTrue(R((s1/usr/lib/python2.7/dist-packages/bzrlib/commit.pyR.sN(R/R0R5R%RR"R'R(R)R,R.(((s1/usr/lib/python2.7/dist-packages/bzrlib/commit.pyR2ks							tCommitcB@sOeZdZdddZeddeddZddddddeeeddeddddddedZ	dZ
dZdZdZ
dd	Zd
ZdZdZd
ZdZdZdZdZdZdZdZdZdZdZedZdZdZdZ RS(sTask of committing a new revision.

    This is a MethodObject: it accumulates state as the commit is
    prepared, and then it is discarded.  It doesn't represent
    historical revisions, just the act of recording a new one.

            missing_ids
            Modified to hold a list of files that have been deleted from
            the working directory; these should be removed from the
            working inventory.
    cC@s||_||_dS(snCreate a Commit object.

        :param reporter: the default reporter to use or None to decide later
        N(treportertconfig_stack(RR;R<((s1/usr/lib/python2.7/dist-packages/bzrlib/commit.pyt__init__s	cC@sW|dkri}n|dkr*g}nd|krO|j|||d<n|dk	r|dk	rvtdnd|ksd|krtdn|rx)|D]!}d|krtdqqWdj||d<qn|dk	rStjdtd|ksd|kr+tdnd|krFtdn||d<n|S(	Nsbranch-nicksOSpecifying both author and authors is not allowed. Specify just authors insteadtauthortauthorssauthor property given twices
s1\n is not a valid character in an author identitysHThe parameter author was deprecated in version 1.13. Use authors instead(Rt	_get_nicktAssertionErrortjoinRRR(trevpropstbranchR?R>tlocaltpossible_master_transportst
individual((s1/usr/lib/python2.7/dist-packages/bzrlib/commit.pytupdate_revpropss6		
	
tdownc#C@st|j}|
pi|_|p*|j|_|jd|d|d|d|d|d|d|d|d	|	d
|d|d|
d
|d|d|d|d|S(sCommit working copy as a new revision.

        :param message: the commit message (it or message_callback is required)
        :param message_callback: A callback: message = message_callback(cmt_obj)

        :param timestamp: if not None, seconds-since-epoch for a
            postdated/predated commit.

        :param specific_files: If not None, commit only those files. An empty
            list means 'commit no files'.

        :param rev_id: If set, use this as the new revision id.
            Useful for test or import commands that need to tightly
            control what revisions are assigned.  If you duplicate
            a revision id that exists elsewhere it is your own fault.
            If null (default), a time/random revision id is generated.

        :param allow_pointless: If true (default), commit even if nothing
            has changed and no merges are recorded.

        :param strict: If true, don't allow a commit if the working tree
            contains unknown files.

        :param revprops: Properties for new revision
        :param local: Perform a local only commit.
        :param reporter: the reporter to use or None for the default
        :param verbose: if True and the reporter is not None, report everything
        :param recursive: If set to 'down', commit in any subtrees that have
            pending changes of any sort during this commit.
        :param exclude: None or a list of relative paths to exclude from the
            commit. Pending changes to excluded files will be ignored by the
            commit.
        :param lossy: When committing to a foreign VCS, ignore any
            data that can not be natively represented.
        tmessaget	timestampttimezonet	committertspecific_filesR&tallow_pointlesststricttverbosetworking_treeRER;tmessage_callbackt	recursivetexcludeRFtlossy(Rt_commitRCR<trun(RRJRKRLRMRNR&RORPRQRCRRRER;tconfigRSRTRURFRVt	operation((s1/usr/lib/python2.7/dist-packages/bzrlib/commit.pytcommits*7	c
@sBtd|dkr%tdnW||_|jj|_t|jddr||jjjs|tj	q|n|dkrdk	rt
trjt
nfd}qtdnd|_t|_|dk	rtt||_n	g|_||_d|_||_d|_|dk	r`tt||_n	d|_||_||_||_||_||_|	|_|
|_|jj |j!|jj"|jj#|_$|jo|jjj%j&o|jjj%j'pt(|j$dk|_)t*j+j,|_-|j!|j-j.|jj/|_0|jj1|_1|j1j2|j!|j1j"t(|jj3dkrt4n|j5|||j6\}}}|
dk	r|
|_7n!|j7dkr|j8|_7n|j9dkr0|jj:|_9n|j;d	|_<d|_=d
|_>|jrp|j>d7_>nt|j-_?t|j-_@t|j-_AtB|j-_CtB|j-_D|jEt(|j$dkr|jdk	rtjF|jnt(|j$dkr"|jr"tjF|jn|jGdd
tB||_H|jjI|j$|j9||||jJ|d||_K|jKjLr|jr|jKjMtjN|jjn|jKjOr|jr|jKjMtPdny|jKjQ|jr|jjR}n|jjR}|j7jS||j||jT|jU|jGd|jKjV|||_W|jKjX|jW|_Wn7tYk
r}tdtZj[|jKjMnX|j\||||jj]|j^|jGd|jj_|j|jKj`|j7ja||j|jb|||jS(Nspreparing to commits*working_tree must be passed into commit().trequires_rich_rootcS@stS(N(R-(((s1/usr/lib/python2.7/dist-packages/bzrlib/commit.pyt<lambda>/sc@sS(N((tx(RJ(s1/usr/lib/python2.7/dist-packages/bzrlib/commit.pyR]6ssKThe message or message_callback keyword parameter is required for commit().iiR6iisCollecting changestcounterRVsGbound branches not supported for commit builders that update the branchsSaving data locallys1aborting commit write group because of exception:sUpdating the working tree(cRRRt	work_treeRDtgetattrt
repositorytsupports_rich_rootRtRootNotRicht
isinstancetstrtdecodeRtbound_branchR-tany_entries_deletedtsortedRRUREt
master_branchRTR&RNRORSRKRLRMRPRQt
lock_writetadd_cleanuptunlocktget_parent_idstparentst_formattsupports_tree_referencetfast_deltastlentuse_record_iter_changesRt
ui_factorytnested_progress_bartpbtfinishedt
last_revisiontbasis_revidt
basis_treet	lock_readt	conflictsR
t_check_bound_brancht_check_out_of_date_treeR;t_select_reporterR<tget_config_stackt_set_specific_file_idst
pb_stage_nametpb_stage_counttpb_stage_totaltshow_pcttshow_spinnertshow_etaR9t
show_counttshow_bart_gather_parentstCannotCommitSelectedFileMerget_set_progress_staget_lossytget_commit_builderRCtbuildertsupports_record_entry_contentstaborttExcludesUnsupportedtupdates_branchRAtwill_record_deletestbaseR"t_update_builder_with_changest_check_pointlesstfinish_inventoryRJR[t	ExceptionRtlog_exception_quietlyt_update_branchest	unversiontdeleted_idstupdate_basis_by_deltatget_basis_deltaR't_process_post_hooks(RRZRJRKRLRMRNR&RORPRQRRRER;RSRTRURFRVt	old_revnot	old_revidt	new_revnotmaster_locationte((RJs1/usr/lib/python2.7/dist-packages/bzrlib/commit.pyRW$s
																


	
				
$	


	



	



c	C@sf|jjs|j|||jr|jd|jj|j||jd|j	\}|_|j	r|jj
|j|jqn|jj||jn4y|j||Wn|jj||nX|jrb|jd|jjj
|jj\}}|rbg|D]\}}}d|^q}ttdjdj|qbndS(s~Update the master and local branch to the new revision.

        This will try to make sure that the master branch is updated
        before the local branch.

        :param old_revno: Revision number of master branch before the
            commit
        :param old_revid: Tip of master branch before the commit
        :param new_revno: Revision number of the new commit
        sUploading data to master branchRVsMerging tags to master branchs    s%Conflicting tags in bound branch:
{0}s
N(RRt_process_pre_hooksRhRRkt"import_last_revision_info_and_tagsRDR&Rtfetchtset_last_revision_infottagstmerge_toRRR3RB(	RRRRttag_updatest
tag_conflictstnamet_t
warning_lines((s1/usr/lib/python2.7/dist-packages/bzrlib/commit.pyRs,	
	'		
&cC@strtStS(s!Select the CommitReporter to use.(RRR2(R((s1/usr/lib/python2.7/dist-packages/bzrlib/commit.pyRs	cC@sF|jr
dSt|jdkr&dS|jjr9dStdS(Ni(RORtRpRtany_changesR	(R((s1/usr/lib/python2.7/dist-packages/bzrlib/commit.pyRs	cC@s
|jr(|jjr(tjn|jsI|jj||_n|jsb|j|_dS|jj}|rtj|j|j|n|jj}|jj}||krtj	|j|jn|j|_
|jj|j|jj
dS(sCheck to see if the local branch is bound.

        If it is bound, then most of the commit will actually be
        done using the remote branch as the target branch.
        Only at the end will the local branch be updated.
        N(RERDtget_bound_locationRtLocalRequiresBoundBranchtget_master_branchRktCommitToDoubleBoundBranchtlast_revision_infotBoundBranchOutOfDateRhRlRmRn(RRZRFtmaster_bound_locationtmaster_infot
local_info((s1/usr/lib/python2.7/dist-packages/bzrlib/commit.pyRs(			
cC@sy|jjd}Wntk
r6tjj}nX|jj\}}||kr|tjjkrtj	|jqn|j
jj|r|d}nd}|||fS(sCheck that the working tree is up to date.

        :return: old_revision_number, old_revision_id, new_revision_number
            tuple
        ii(
R`Rot
IndexErrortbzrlibtrevisiont
NULL_REVISIONRkRRt
OutOfDateTreeRDRbthas_revision(Rtfirst_tree_parentRtmaster_lastR((s1/usr/lib/python2.7/dist-packages/bzrlib/commit.pyR=s

cC@s$|jd|jd||dS(s(Process any registered pre commit hooks.sRunning pre_commit hookst
pre_commitN(Rt_process_hooks(RRR((s1/usr/lib/python2.7/dist-packages/bzrlib/commit.pyRVs
cC@s|jd|jjd}|dk	r||jd}x?|D]4}t|di|jd6td6|jd6}qAWn|j	d||dS(	s)Process any registered post commit hooks.sRunning post_commit hookstpost_committ s(branch, rev_id)RDRR&N(
RR<tgetRtsplittevalRDRR&R(RRRRthooksthooktresult((s1/usr/lib/python2.7/dist-packages/bzrlib/commit.pyR[s



c

C@sYtj|sdS|js,|j}d}n|j}|j}|jrW|jd}ntjj	}|dkr|j
j}|j|j
dt}nxtj|D]}	d|tjj|	f|_|jdtjkrtd|	n|dkr |	||||||jq|dkr|	||||||j||qqWdS(NiRtinclude_rootsRunning %s hooks [%s]RsInvoking commit hook: %rR(RRRhRDRRkRpRRRRt
revision_treetchanges_fromR|R9t
get_hook_nameRt_emit_progressRtdebug_flagsRR&(
Rt	hook_nameRRthook_mastert
hook_localRtfuture_treet
tree_deltaR((s1/usr/lib/python2.7/dist-packages/bzrlib/commit.pyRms6
						

	cC@s|jr
dS|jj|_|jg|_xl|jdD]]}|jjj|rt	d||jjj
|}|jj|q9t	d|q9WdS(s2Record the parents of a merge for merge detection.Niscommit parent revision {%s}s!commit parent ghost revision {%s}(RuR|troot_inventoryt	basis_invtparent_invsRpRDRbRRt
get_inventorytappend(RRt	inventory((s1/usr/lib/python2.7/dist-packages/bzrlib/commit.pyRs	
cC@s|j}|j}td||j|jr|jj|jd|}|j|}xf|j	j
|j|j|D]%\}}}|jj|||q{Wn|j
|j|jdS(sHUpdate the commit builder with the data about what has changed.
        s)Selecting files for commit with filter %sRNN(RURNRt
_check_strictRuR`titer_changesR|t_filter_iter_changesRtrecord_iter_changesR{t_observed_sha1t_populate_from_inventoryt_record_unselectedt_report_and_accumulate_deletes(RRURNRtfile_idR$tfs_hash((s1/usr/lib/python2.7/dist-packages/bzrlib/commit.pyRs		

		"

c
c@s'|j}|j}g}x|D]}|r[|dd}|dd}|dd}n|dd}	|dd}|	dkr|r|r|j|n|j|d|d|dddf|d|ddtff|d}|dd}t}n=|	dkrB|jdkrB|j|d|ddqBn|dds^|ddr|V|r|dkr|j|q	|dkr|j	t
d	|q	||kr|jt
d
||q	|s|jj
jjjr	|j	t
d|q	qn|jq"W||_dS(
sJProcess iter_changes.

        This method reports on the changes in iter_changes to the user, and 
        converts 'missing' entries in the iter_changes iterator to 'deleted'
        entries. 'missing' entries have their

        :param iter_changes: An iter_changes to process.
        :return: A generator of changes.
        iiiiiistree-referenceRIR7R,R8N(R;R.RR)RR-RTt_commit_nested_treeR(R%RR,R`RDRbRqtrich_root_datat_next_progress_entryR(
RRR;treport_changesRR#R*R+t	versionedtkind((s1/usr/lib/python2.7/dist-packages/bzrlib/commit.pyRsF
	
	"cC@s|js|jr|jpg}x|jjD]\}}|jjj|jr[q1nt||rt|j|rq1n|j	}t
|jdkrd|_
n|jj||j||jdq1WndS(Ni(RNRURtiter_entriesRt
new_inventorythas_idRR
tcopyRtRpRRtrecord_entry_contentsRR|(RRNR$told_ietie((s1/usr/lib/python2.7/dist-packages/bzrlib/commit.pyRscC@st|jtr[t|jjtr[t|jjjt|jjjj}nt|jt|jj}|rt|_	g|D]}|j
j||f^q}|jx:|D]/\}}|jj
|||jj|qWndS(N(ReRRRRtsett_byidtkeysR9RiR|tid2pathtsortt
record_deleteR;R((RRRR(R$((s1/usr/lib/python2.7/dist-packages/bzrlib/commit.pyRs	(
cC@s3|jr/x#|jjD]}tqWndS(N(RPR`tunknownsR(Rtunknown((s1/usr/lib/python2.7/dist-packages/bzrlib/commit.pyR#s	cC@s|j}|j}|jj}g}i}|jjd|jdt}x=|D]5\}}|j}	|j	}
|j
}|j}|rt|}
|}x0|
D]"}|j
|d}|sPqqWd}|dk	rqRqn|rt||rqRn|jj|}|d}|s/t||r|dkr|sPt|}
n|}x |
D]}|j|i}q]W|jj||j|j|	qRqn|dkrP|jjs|jjjjrd}|dddf}qP|jdkr)|j|	|}|dd|f}qP|jj|	}|dd|f}n||jk}|j||	|||
|||||
qRW||_dS(	sAPopulate the CommitBuilder by walking the working tree inventory.tspecific_file_idst
yield_parentsiR)stree-referencet	directoryRIN(RNRUR;R.R`titer_entries_by_dirRR9RRt	parent_idRRRRR
tpath_content_summaryt
setdefaultR)RRRrRDRbRqRTRtget_reference_revisiont
_record_entryR(RRNRURRt
deleted_pathstentriesR$texisting_ieRRRRt
path_segmentstdeleted_dicttsegmenttcontent_summarytnested_revision_idtdefinitely_changed((s1/usr/lib/python2.7/dist-packages/bzrlib/commit.pyR,sj						
	



	cC@s|jj||}|jjj|jjjrK|jjj|j_nyw|jdd
d|jd|jd|j	d|j
d|jd|jd|j
d	|jd
|jd|jd|jSWn!tjk
r|jj|SXd
S(sCommit a nested tree.RJRCRTRSRKRLRMRORPRQRER;N(R`tget_nested_treeRDRbthas_same_locationR[RRCRTRSRKRLRMRORPRQRER;RR	R(RRR$tsub_tree((s1/usr/lib/python2.7/dist-packages/bzrlib/commit.pyRs				cC@s|s|dkr*t||||}n|j}d|_|jj||j||j|
\}}}
|	r|j||n|
r|jj	|j
||
n|S(s1Record the new inventory entry for a path if any.N(RRRRRRRR`t_report_changeRR(RR$RRNRRRRR
RRRRR((s1/usr/lib/python2.7/dist-packages/bzrlib/commit.pyRs		$cC@s|jj|jr(|j|j}nd}|j||}|tjtjfkr|jj|j}|j	j
||||jn3|tdkrdS|j	j
|||jdS(sReport a change to the user.

        The change that has occurred is described relative to the basis
        inventory.
        t	unchangedN(RRRRtdescribe_changeRtRENAMEDtMODIFIED_AND_RENAMEDRR;R,RRR%(RRR$tbasis_ieR#R*((s1/usr/lib/python2.7/dist-packages/bzrlib/commit.pyRs	
cC@sA||_|jd7_|r*d|_n	d|_|jdS(s>Set the progress stage and emit an update to the progress bar.iiN(RRtpb_entries_countRR(RRR_((s1/usr/lib/python2.7/dist-packages/bzrlib/commit.pyRs		cC@s|jd7_|jdS(sAEmit an update to the progress bar and increment the entry count.iN(RR(R((s1/usr/lib/python2.7/dist-packages/bzrlib/commit.pyRscC@sf|jdk	r0tdj|j|j}ntd|jf}|jj||j|jdS(Ns{0} [{1}] - Stages
%s - Stage(	RRRR3RRxtupdateRR(Rttext((s1/usr/lib/python2.7/dist-packages/bzrlib/commit.pyRs
cC@sO|jsK|jdk	r?tj|j|j|jg|_qKd|_ndS(s2populate self.specific_file_ids if we will use it.N(RuRNRRtfind_ids_across_treesR|R`R(R((s1/usr/lib/python2.7/dist-packages/bzrlib/commit.pyRs
	!N(!R/R0R1RR=tstaticmethodR-RHR9R[RWRRRRRRRRRRRRRRRRRRRRRR(((s1/usr/lib/python2.7/dist-packages/bzrlib/commit.pyR:s`$;		.		
+				+			4					e			
		((t
__future__RRRRRRRt
bzrlib.branchRtbzrlib.cleanupRt
bzrlib.configt
bzrlib.errorsRR	R
Rtbzrlib.osutilsRR
RRtbzrlib.traceRRRtbzrlib.inventoryRRRRtbzrlib.urlutilsRtbzrlib.i18nRtobjectRR2R:(((s1/usr/lib/python2.7/dist-packages/bzrlib/commit.pyt<module>s$(""0

Copyright © 2017 || Recoded By Mr.Bumblebee