-=[ Mr. Bumblebee ]=-
_Indonesia_

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

ó
¦îNc@@s¾ddlmZddlmZeeƒdƒddlmZmZddlm	Z	dZ
dZdefd	„ƒYZ
ed
„Zd„Zd„Zd
„Zd„Zd„Zd„ZdS(i(tabsolute_import(tlazy_imports
from bzrlib import bugtracker
(terrorstsymbol_versioning(tcontains_whitespacesnull:scurrent:tRevisioncB@sbeZdZd
d„Zd„Zd„Zd„Zd„Zd„Z	d„Z
d„Zd	„ZRS(sSingle revision on a branch.

    Revisions may know their revision_hash, but only once they've been
    written out.  This is not stored because you cannot write the hash
    into the file it describes.

    After bzr 0.0.5 revisions are allowed to have multiple parents.

    parent_ids
        List of parent revision_ids

    properties
        Dictionary of revision properties.  These are attached to the
        revision as extra metadata.  The name must be a single
        word; the value can be an arbitrary string.
    cK@sc||_|dkr!i|_n||_|jƒd|_g|_g|_|jj|ƒdS(N(	trevision_idtNonet
propertiest_check_propertiest	committert
parent_idstparent_sha1st__dict__tupdate(tselfRRtargs((s3/usr/lib/python2.7/dist-packages/bzrlib/revision.pyt__init__7s		
			cC@sd|jS(Ns<Revision id %s>(R(R((s3/usr/lib/python2.7/dist-packages/bzrlib/revision.pyt__repr__DscC@s¡t|tƒstS|j|jko |j|jko |j|jko |j|jko |j|jko |j|jko |j	|j	ko |j
|j
kS(N(t
isinstanceRtFalsetinventory_sha1Rt	timestamptmessagettimezoneR
RR(Rtother((s3/usr/lib/python2.7/dist-packages/bzrlib/revision.pyt__eq__GscC@s|j|ƒS(N(R(RR((s3/usr/lib/python2.7/dist-packages/bzrlib/revision.pyt__ne__TscC@s{xt|jjƒD]c\}}t|tƒs8t|ƒrKtd|ƒ‚nt|tƒstd||fƒ‚qqWdS(s+Verify that all revision properties are OK.sinvalid property name %rs invalid property value %r for %rN(Rt	iteritemsRt
basestringRt
ValueError(Rtnametvalue((s3/usr/lib/python2.7/dist-packages/bzrlib/revision.pyR	WscC@s~|}g}xa|dk	ro|j|jƒt|jƒsP|jdƒd}q|jd}|j|ƒ}qW|jƒ|S(sŸReturn the canonical line-of-history for this revision.

        If ghosts are present this may differ in result from a ghost-free
        repository.
        iN(RtappendRtlenRtget_revisiontreverse(Rt
repositorytcurrent_revisiontreversed_resulttnext_revision_id((s3/usr/lib/python2.7/dist-packages/bzrlib/revision.pytget_history`s
	

cC@s.|jr&|jjƒjddƒdSdSdS(suGet the first line of the log message for this revision.

        Return an empty string if message is None.
        s
iitN(Rtlstriptsplit(R((s3/usr/lib/python2.7/dist-packages/bzrlib/revision.pytget_summaryss	cC@sa|jjddƒ}|dkrP|jjd|jƒ}|dkrIgS|gS|jdƒSdS(sReturn the apparent authors of this revision.

        If the revision properties contain the names of the authors,
        return them. Otherwise return the committer name.

        The return value will be a list containing at least one element.
        tauthorstauthors
N(RtgetRR
R,(RR.R/((s3/usr/lib/python2.7/dist-packages/bzrlib/revision.pytget_apparent_authors}scc@s«|jjddƒ}|dkr%dSx|jƒD]q}y|jddƒ\}}Wn tk
rvtj|ƒ‚nX|tj	kr˜tj
|ƒ‚n||fVq2WdS(s4Iterate over the bugs associated with this revision.tbugsNi(RR0Rt
splitlinesR,RRtInvalidLineInBugsPropertyt
bugtrackertALLOWED_BUG_STATUSEStInvalidBugStatus(Rtbug_propertytlineturltstatus((s3/usr/lib/python2.7/dist-packages/bzrlib/revision.pyt	iter_bugsŽs
N(
t__name__t
__module__t__doc__RRRRRR	R)R-R1R<(((s3/usr/lib/python2.7/dist-packages/bzrlib/revision.pyR%s
		
					
	c	c@sÏ|f}d}x¹t|ƒdkrÊg}xŠ|D]‚}|sK||fVny|j|ƒ}Wn.tjk
rŽ}|j|kr1‚qq1nX|r£||fVn|j|jƒq1W|}|d7}qWdS(Nii(R"R#RtNoSuchRevisiontrevisiontextendR(	Rtrevision_sourcetonly_presentt	ancestorstdistancet
new_ancestorstancestorRAte((s3/usr/lib/python2.7/dist-packages/bzrlib/revision.pytiter_ancestorss$	
cC@sai}tt||dtƒƒ}x9|D]1\}\}}||kr(||f||<q(q(W|S(sœReturn the ancestors of a revision present in a branch.

    It's possible that a branch won't have the complete ancestry of
    one of its revisions.

    RD(t	enumerateRJtTrue(RRCtfound_ancestorstanc_itert	anc_ordertanc_idtanc_distance((s3/usr/lib/python2.7/dist-packages/bzrlib/revision.pytfind_present_ancestors³scC@sQ|jƒg}x:|D]2}|d|ddkr|j|dƒqqW|S(Nii(tsortR!(tintersectiontmatchestentry((s3/usr/lib/python2.7/dist-packages/bzrlib/revision.pyt
__get_closestÃs

cC@st|tƒo|jdƒS(spDetermine whether a revision id is reserved

    :return: True if the revision is reserved, False otherwise
    t:(RRtendswith(R((s3/usr/lib/python2.7/dist-packages/bzrlib/revision.pytis_reserved_idÌscC@s"t|ƒrtj|ƒ‚ndS(s8Raise ReservedId if the supplied revision_id is reservedN(RZRt
ReservedId(R((s3/usr/lib/python2.7/dist-packages/bzrlib/revision.pytcheck_not_reserved_idÔscC@s.|dkr&tjdtddƒtS|SdS(s@Ensure only NULL_REVISION is used to represent the null revisionsSNULL_REVISION should be used for the null revision instead of None, as of bzr 0.91.t
stackleveliN(RRtwarntDeprecationWarningt
NULL_REVISION(R((s3/usr/lib/python2.7/dist-packages/bzrlib/revision.pytensure_nullÚs
	
cC@s5|dkr%tjdtddƒn|dtfkS(NsSNULL_REVISION should be used for the null revision instead of None, as of bzr 0.90.R]i(RRR^R_R`(R((s3/usr/lib/python2.7/dist-packages/bzrlib/revision.pytis_nullås	N(t
__future__Rtbzrlib.lazy_importRtglobalstbzrlibRRtbzrlib.osutilsRR`tCURRENT_REVISIONtobjectRRRJRRRWRZR\RaRb(((s3/usr/lib/python2.7/dist-packages/bzrlib/revision.pyt<module>s	x						

Copyright © 2017 || Recoded By Mr.Bumblebee