-=[ Mr. Bumblebee ]=-
_Indonesia_

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

ó
ßïNc@@s‘ddlmZddlmZeeƒdƒddlmZmZmZm	Z	de
fd„ƒYZde
fd„ƒYZd	efd
„ƒYZ
defd„ƒYZeZd
efd„ƒYZdefd„ƒYZdefd„ƒYZdefd„ƒYZdefd„ƒYZde
fd„ƒYZdefd„ƒYZdefd„ƒYZdefd„ƒYZdefd „ƒYZd!efd"„ƒYZd#efd$„ƒYZejejd*ƒd'gƒZe
j eƒe
j eƒe
j eƒe
j eƒej!ƒZ"d(„Z#e#eƒe#eƒe#eƒe#eƒe#eƒe#eƒe#eƒe#eƒe#eƒe#eƒe#eƒd)S(+i(tabsolute_import(tlazy_imports¹
import bisect
import datetime

from bzrlib import (
    branch as _mod_branch,
    osutils,
    revision,
    symbol_versioning,
    workingtree,
    )
from bzrlib.i18n import gettext
(terrorst
lazy_regextregistryttracetRevisionInfocB@s}eZdZdZddd„Zed„ƒZd„Zd„Z	d„Z
d„Zd„Zd	„Z
eejd
„ƒZRS(s=The results of applying a revision specification to a branch.sThe results of applying a revision specification to a branch.

    An instance has two useful attributes: revno, and rev_id.

    They can also be accessed as spec[0] and spec[1] respectively,
    so that you can write code like:
    revno, rev_id = RevisionSpec(branch, spec)
    although this is probably going to be deprecated later.

    This class exists mostly to be the return value of a RevisionSpec,
    so that you can access the member you're interested in (number or id)
    or treat the result as a tuple.
    cC@sd||_|dk	|_||_||_|jdkr`|jdk	r`|j|jƒ|_ndS(N(tbranchtNonet
_has_revnot_revnotrev_idt
get_rev_id(tselfRtrevnoR((s7/usr/lib/python2.7/dist-packages/bzrlib/revisionspec.pyt__init__<s			cC@sh|jra|jdk	ray|jj|jƒ|_Wntjk
rTd|_nXt|_n|jS(N(	R	RRRtrevision_id_to_revnoR
RtNoSuchRevisiontTrue(R
((s7/usr/lib/python2.7/dist-packages/bzrlib/revisionspec.pyREs
cC@s)|jdkrtS|jjj|jƒS(N(RRtFalseRt
repositorythas_revision(R
((s7/usr/lib/python2.7/dist-packages/bzrlib/revisionspec.pyt__nonzero__OscC@sdS(Ni((R
((s7/usr/lib/python2.7/dist-packages/bzrlib/revisionspec.pyt__len__WscC@s6|dkr|jS|dkr&|jSt|ƒ‚dS(Nii(RRt
IndexError(R
tindex((s7/usr/lib/python2.7/dist-packages/bzrlib/revisionspec.pyt__getitem__Zs
cC@s|jjj|jƒS(N(RRtget_revisionR(R
((s7/usr/lib/python2.7/dist-packages/bzrlib/revisionspec.pytget_scC@sit|ƒttt|ƒfkr%tSt|ƒt|ƒkrS|j|jk	rStSt|ƒt|ƒkS(N(ttypettupletlistRR(R
tother((s7/usr/lib/python2.7/dist-packages/bzrlib/revisionspec.pyt__eq__bs
!*cC@sd|j|j|jfS(Ns7<bzrlib.revisionspec.RevisionInfo object %s, %s for %r>(RRR(R
((s7/usr/lib/python2.7/dist-packages/bzrlib/revisionspec.pyt__repr__iscC@s>tj|ƒr(tjdtddƒnt|ddd|ƒS(ssConstruct a RevisionInfo given just the id.

        Use this if you don't know or care what the revno is.
        s:RevisionInfo.from_revision_id(revs) was deprecated in 2.5.t
stackleveliRRN(tsymbol_versioningtdeprecated_passedtwarntDeprecationWarningRR(Rtrevision_idtrevs((s7/usr/lib/python2.7/dist-packages/bzrlib/revisionspec.pytfrom_revision_idms
N(t__name__t
__module__t__doc__thelp_txtRRtpropertyRRRRRR!R"tstaticmethodR$tDEPRECATED_PARAMETERR*(((s7/usr/lib/python2.7/dist-packages/bzrlib/revisionspec.pyR+s	
						tRevisionSpeccB@s­eZdZdZdZeZej	fZ
ed„ƒZed„Z
d„Zd„Zd„ZeZeZd„Zd„Zd	„Zd
„Zd„Zd„Zd
„ZRS(s A parsed revision specification.sÃA parsed revision specification.

    A revision specification is a string, which may be unambiguous about
    what it represents by giving a prefix like 'date:' or 'revid:' etc,
    or it may have no prefix, in which case it's tried against several
    specifier types in sequence to determine what the user meant.

    Revision specs are an UI element, and they have been moved out
    of the branch class to leave "back-end" classes unaware of such
    details.  Code that gets a revno or rev_id from other code should
    not be using revision specs - revnos and revision ids are the
    accepted ways to refer to revisions internally.

    (Equivalent to the old Branch method get_revision_info())
    cC@s§t|tdƒtfƒs*tdƒ‚n|dkrFtddtƒStj|ƒ}|dk	r“|\}}t	j
d|j|ƒ||dtƒSt|dtƒSdS(sÞParse a revision spec string into a RevisionSpec object.

        :param spec: A string specified by the user
        :return: A RevisionSpec object that understands how to parse the
            supplied notation.
        terrort	_internals Returning RevisionSpec %s for %sN(
t
isinstanceRRt
basestringt	TypeErrorR2Rtrevspec_registryt
get_prefixRtmutterR+tRevisionSpec_dwim(tspectmatchtspectypet
specsuffix((s7/usr/lib/python2.7/dist-packages/bzrlib/revisionspec.pytfrom_stringšs	
cC@sf|stjdtddƒn||_|jrY|j|jƒrY|t|jƒ}n||_dS(sCreate a RevisionSpec referring to the Null revision.

        :param spec: The original spec supplied by the user
        :param _internal: Used to ensure that RevisionSpec is not being
            called directly. Only from RevisionSpec.from_string()
        smCreating a RevisionSpec directly has been deprecated in version 0.11. Use RevisionSpec.from_string() instead.R#iN(R$R&R't	user_spectprefixt
startswithtlenR<(R
R<R4((s7/usr/lib/python2.7/dist-packages/bzrlib/revisionspec.pyR²s		cC@stjdƒt|ddƒS(Ns&Returning RevisionSpec._match_on: None(RR:RR(R
RR)((s7/usr/lib/python2.7/dist-packages/bzrlib/revisionspec.pyt	_match_onÄs
cC@sf|j||ƒ}|r|S|dkr,|S|jrMtj|j|ƒ‚ntj|j|ƒ‚dS(N(NN(RERRBRtInvalidRevisionSpecRAR<(R
RR)tinfo((s7/usr/lib/python2.7/dist-packages/bzrlib/revisionspec.pyt_match_on_and_checkÈs	cC@s¤|rŽ|jr…tjd|jjtƒ|jƒz7|jjƒ}t	|j
|jƒtj
gƒƒ}Wd|jƒX|jƒq”d}nd}|j||ƒS(Ns?RevisionSpec.wants_revision_history was deprecated in 2.5 (%s).(twants_revision_historyR$R&t	__class__R+R't	lock_readRt	get_graphRtiter_lefthand_ancestryt
last_revisiontrevisiont
NULL_REVISIONtunlocktreverseRRH(R
RtgraphR)((s7/usr/lib/python2.7/dist-packages/bzrlib/revisionspec.pyt
in_historyÔs 	

	
	cC@s
|j|ƒS(sÃReturn just the revision_id for this revisions spec.

        Some revision specs require a context_branch to be able to determine
        their value. Not all specs will make use of it.
        (t_as_revision_id(R
tcontext_branch((s7/usr/lib/python2.7/dist-packages/bzrlib/revisionspec.pytas_revision_idõscC@s|j|ƒjS(s»Implementation of as_revision_id()

        Classes should override this function to provide appropriate
        functionality. The default is to just call '.in_history().rev_id'
        (RTR(R
RV((s7/usr/lib/python2.7/dist-packages/bzrlib/revisionspec.pyRUýscC@s
|j|ƒS(säReturn the tree object for this revisions spec.

        Some revision specs require a context_branch to be able to determine
        the revision id and access the repository. Not all specs will make
        use of it.
        (t_as_tree(R
RV((s7/usr/lib/python2.7/dist-packages/bzrlib/revisionspec.pytas_treescC@s|j|ƒ}|jj|ƒS(söImplementation of as_tree().

        Classes should override this function to provide appropriate
        functionality. The default is to just call '.as_revision_id()'
        and get the revision tree from context_branch's repository.
        (RWRt
revision_tree(R
RVR(((s7/usr/lib/python2.7/dist-packages/bzrlib/revisionspec.pyRXscC@sd|jj|jfS(Ns<%s %s>(RJR+RA(R
((s7/usr/lib/python2.7/dist-packages/bzrlib/revisionspec.pyR"scC@stS(s|Whether this revision spec needs a branch.

        Set this to False the branch argument of _match_on is not used.
        (R(R
((s7/usr/lib/python2.7/dist-packages/bzrlib/revisionspec.pytneeds_branchscC@sdS(slWhen the revision specifier contains a branch location, return it.

        Otherwise, return None.
        N(R(R
((s7/usr/lib/python2.7/dist-packages/bzrlib/revisionspec.pyt
get_branch$sN(R+R,R-R.RRBRRIRRFtdwim_catchable_exceptionsR0R@RRERHRTtin_storet	in_branchRWRURYRXR"R[R\(((s7/usr/lib/python2.7/dist-packages/bzrlib/revisionspec.pyR2{s&									
		R;cB@sYeZdZdZejdƒZgZd„Z	d„Z
ed„ƒZed„ƒZ
RS(s^Provides a DWIMish revision specifier lookup.

    Note that this does not go in the revspec_registry because by definition
    there is no prefix to identify it.  It's solely called from
    RevisionSpec.from_string() because the DWIMification happen when _match_on
    is called so the string describing the revision is kept here until needed.
    s^(?:(\d+(\.\d+)*)|-\d+)(:.*)?$cC@s"||jdtƒ}|j|ƒS(NR4(R<RRT(R
trstypeRtrs((s7/usr/lib/python2.7/dist-packages/bzrlib/revisionspec.pyt
_try_spectype>scC@sé|jj|jƒdk	rIy|jt|ƒSWqItjk
rEqIXnxH|jD]=}|jƒ}y|j||ƒSWqS|jk
rqSXqSWx9t	D]1}y|j||ƒSWq›|jk
rËq›Xq›Wt
j|j|ƒ‚dS(s'Run the lookup and see what we can get.N(t_revno_regexR=R<RRbtRevisionSpec_revnoR]t_possible_revspecstget_objt
dwim_revspecsRRF(R
RR)t	objgettertrs_class((s7/usr/lib/python2.7/dist-packages/bzrlib/revisionspec.pyREDs"
cC@s|jjtj|ƒƒdS(sWAppend a possible DWIM revspec.

        :param revspec: Revision spec to try.
        N(RetappendRt
_ObjectGetter(tclstrevspec((s7/usr/lib/python2.7/dist-packages/bzrlib/revisionspec.pytappend_possible_revspecbscC@s |jjtj||ƒƒdS(s¹Append a possible lazily loaded DWIM revspec.

        :param module_name: Name of the module with the revspec
        :param member_name: Name of the revspec within the module
        N(ReRjRt_LazyObjectGetter(Rltmodule_nametmember_name((s7/usr/lib/python2.7/dist-packages/bzrlib/revisionspec.pytappend_possible_lazy_revspecjs	N(R+R,R-RR.Rtlazy_compileRcReRbREtclassmethodRnRr(((s7/usr/lib/python2.7/dist-packages/bzrlib/revisionspec.pyR;.s		RdcB@sGeZdZdZdZd„Zd„Zd„Zd„Zd„Z	RS(s"Selects a revision using a number.s†Selects a revision using a number.

    Use an integer to specify a revision in the history of the branch.
    Optionally a branch can be specified.  A negative number will count
    from the end of the branch (-1 is the last revision, -2 the previous
    one). If the negative number is larger than the branch's history, the
    first revision is returned.
    Examples::

      revno:1                   -> return the first revision of this branch
      revno:3:/path/to/branch   -> return the 3rd revision of
                                   the branch '/path/to/branch'
      revno:-1                  -> The last revision in a branch.
      -2:http://other/branch    -> The second to last revision in the
                                   remote branch.
      -1000000                  -> Most likely the first revision, unless
                                   your history is very long.
    srevno:cC@s(|j|ƒ\}}}t|||ƒS(s$Lookup a revision by revision number(t_lookupR(R
RR)RR(((s7/usr/lib/python2.7/dist-packages/bzrlib/revisionspec.pyREŒscC@s|jjdƒ}|dkr0|j}d}n|j| }|j|d}|dkr„|s{tj|j|dƒ‚nd}nyt|ƒ}t}Wnhtk
ry#t	d„|j
dƒDƒƒ}Wn+tk
rú}tj|j||ƒ‚nXt}nX|r tj
j|ƒ}n|r{y|j|dtƒ}	Wn)tjk
rjtj|j|ƒ‚qÿX|d|	fSn„|jƒ\}
}|d	krÀ||
kr¯d}qÀ|
|d}ny|j|ƒ}	Wn)tjk
rþtj|j|ƒ‚nX|||	fS(
Nt:iÿÿÿÿits(cannot have an empty revno and no branchcs@s|]}t|ƒVqdS(N(tint(t.0tnumber((s7/usr/lib/python2.7/dist-packages/bzrlib/revisionspec.pys	<genexpr>¨st.t_cache_reversei(R<tfindRRRFRARxRt
ValueErrorRtsplitRt_mod_branchtBranchtopentdotted_revno_to_revision_idRtlast_revision_infoR(R
Rtloct
revno_spectbranch_specRtdottedtmatch_revnoteR(t
last_revnotlast_revision_id((s7/usr/lib/python2.7/dist-packages/bzrlib/revisionspec.pyRu‘sN		
	

#


	cC@s|j|ƒ\}}}|S(N(Ru(R
RVRRR(((s7/usr/lib/python2.7/dist-packages/bzrlib/revisionspec.pyRUËscC@s|jjdƒdkS(NRviÿÿÿÿ(R<R}(R
((s7/usr/lib/python2.7/dist-packages/bzrlib/revisionspec.pyR[ÐscC@s;|jjdƒdkrdS|j|jjdƒdSdS(NRviÿÿÿÿi(R<R}R(R
((s7/usr/lib/python2.7/dist-packages/bzrlib/revisionspec.pyR\Ós(
R+R,R-R.RBRERuRUR[R\(((s7/usr/lib/python2.7/dist-packages/bzrlib/revisionspec.pyRdus		:		tRevisionIDSpeccB@seZd„ZRS(cC@s|j|ƒ}tj||ƒS(N(RWRR*(R
RR)R(((s7/usr/lib/python2.7/dist-packages/bzrlib/revisionspec.pyREßs(R+R,RE(((s7/usr/lib/python2.7/dist-packages/bzrlib/revisionspec.pyRÝstRevisionSpec_revidcB@s#eZdZdZdZd„ZRS(s)Selects a revision using the revision id.s$Selects a revision using the revision id.

    Supply a specific revision id, that can be used to specify any
    revision id in the ancestry of the branch.
    Including merges, and pending merges.
    Examples::

      revid:aaaa@bbbb-123456789 -> Select revision 'aaaa@bbbb-123456789'
    srevid:cC@stj|jdtƒS(NR&(tosutilstsafe_revision_idR<R(R
RV((s7/usr/lib/python2.7/dist-packages/bzrlib/revisionspec.pyRUós(R+R,R-R.RBRU(((s7/usr/lib/python2.7/dist-packages/bzrlib/revisionspec.pyRŽäs
tRevisionSpec_lastcB@s5eZdZdZdZd„Zd„Zd„ZRS(s&Selects the nth revision from the end.s5Selects the nth revision from the end.

    Supply a positive number to get the nth revision from the end.
    This is the same as supplying negative numbers to the 'revno:' spec.
    Examples::

      last:1        -> return the last revision
      last:3        -> return the revision 2 before the end.
    slast:cC@s%|j|ƒ\}}t|||ƒS(N(t_revno_and_revision_idR(R
RR)RR(((s7/usr/lib/python2.7/dist-packages/bzrlib/revisionspec.pyRE
scC@s|jƒ\}}|jdkrC|s9tj|ƒ‚n||fSyt|jƒ}Wn+tk
rƒ}tj|j||ƒ‚nX|dkr«tj|j|dƒ‚n||d}y|j|ƒ}Wn)tj	k
r÷tj|j|ƒ‚nX||fS(NRwis you must supply a positive valuei(
R„R<Rt	NoCommitsRxR~RFRARR(R
RVR‹RŒtoffsetRŠRR(((s7/usr/lib/python2.7/dist-packages/bzrlib/revisionspec.pyR’s$
cC@s|j|ƒ\}}|S(N(R’(R
RVRR(((s7/usr/lib/python2.7/dist-packages/bzrlib/revisionspec.pyRU&s(R+R,R-R.RBRER’RU(((s7/usr/lib/python2.7/dist-packages/bzrlib/revisionspec.pyR‘ûs
		tRevisionSpec_beforecB@s,eZdZdZdZd„Zd„ZRS(s-Selects the parent of the revision specified.sòSelects the parent of the revision specified.

    Supply any revision spec to return the parent of that revision.  This is
    mostly useful when inspecting revisions that are not in the revision history
    of a branch.

    It is an error to request the parent of the null revision (before:0).

    Examples::

      before:1913    -> Return the parent of revno 1913 (revno 1912)
      before:revid:aaaa@bbbb-1234567890  -> return the parent of revision
                                            aaaa@bbbb-1234567890
      bzr diff -r before:1913..1913
            -> Find the changes between revision 1913 and its parent (1912).
               (What changes did revision 1913 introduce).
               This is equivalent to:  bzr diff -c 1913
    sbefore:cC@sötj|jƒj||ƒ}|jdkrHtj|j|dƒ‚n|jdkr—|j	j
|jƒ}|jst
j}n
|jd}d}nO|jd}y|j||ƒ}Wn)tjk
råtj|j|ƒ‚nXt|||ƒS(Nis#cannot go before the null: revisioni(R2R@R<RERRRFRARRRRt
parent_idsRORPRRR(R
RR)trtrevR(R((s7/usr/lib/python2.7/dist-packages/bzrlib/revisionspec.pyREFs"	
	

cC@sâtj|jƒj|ƒ}|tjkrEtj|j|dƒ‚n|j	}|j
ƒz|j|gƒ}Wd|jƒX||kr£tj|j|dƒ‚n||}t
|ƒdkrÚtj|j|dƒ‚n|dS(Ns#cannot go before the null: revisions!cannot find the matching revisionisNo parents for revision.i(R2R@R<RURORPRRFRARRKtget_parent_mapRQRD(R
RVtbase_revision_idtcontext_repot
parent_maptparents((s7/usr/lib/python2.7/dist-packages/bzrlib/revisionspec.pyRU\s"	

(R+R,R-R.RBRERU(((s7/usr/lib/python2.7/dist-packages/bzrlib/revisionspec.pyR•.s
	tRevisionSpec_tagcB@s>eZdZdZdZejejfZd„Z	d„Z
RS(s(Select a revision identified by tag namesvSelects a revision identified by a tag name.

    Tags are stored in the branch and created by the 'tag' command.
    stag:cC@stj||jj|jƒƒS(N(RR*ttagst
lookup_tagR<(R
RR)((s7/usr/lib/python2.7/dist-packages/bzrlib/revisionspec.pyRE~s	cC@s|jj|jƒS(N(RŸR R<(R
RV((s7/usr/lib/python2.7/dist-packages/bzrlib/revisionspec.pyRUƒs(R+R,R-R.RBRt	NoSuchTagtTagsNotSupportedR]RERU(((s7/usr/lib/python2.7/dist-packages/bzrlib/revisionspec.pyRžss	t_RevListToTimestampscB@s2eZdZdgZd„Zd„Zd„ZRS(s@This takes a list of revisions, and allows you to bisect by dateRcC@s
||_dS(N(R(R
R((s7/usr/lib/python2.7/dist-packages/bzrlib/revisionspec.pyRscC@s4|jjj|jj|ƒƒ}tjj|jƒS(s Get the date of the index'd item(RRRRtdatetimet
fromtimestampt	timestamp(R
RR—((s7/usr/lib/python2.7/dist-packages/bzrlib/revisionspec.pyRs!cC@s
|jjƒS(N(RR(R
((s7/usr/lib/python2.7/dist-packages/bzrlib/revisionspec.pyR–s(R+R,R-t	__slots__RRR(((s7/usr/lib/python2.7/dist-packages/bzrlib/revisionspec.pyR£ˆs
			tRevisionSpec_datecB@s2eZdZdZdZejdƒZd„ZRS(s/Selects a revision on the basis of a datestamp.srSelects a revision on the basis of a datestamp.

    Supply a datestamp to select the first revision that matches the date.
    Date can be 'yesterday', 'today', 'tomorrow' or a YYYY-MM-DD string.
    Matches the first entry after a given date (either at midnight or
    at a specified time).

    One way to display all the changes since yesterday would be::

        bzr log -r date:yesterday..

    Examples::

      date:yesterday            -> select the first revision since yesterday
      date:2006-08-14,17:10:14  -> select the first revision after
                                   August 14th, 2006 at 5:10pm.
    sdate:s‚(?P<date>(?P<year>\d\d\d\d)-(?P<month>\d\d)-(?P<day>\d\d))?(,|T)?\s*(?P<time>(?P<hour>\d\d):(?P<minute>\d\d)(:(?P<second>\d\d))?)?c

C@s¤tjjtjjƒjƒƒ}|jjƒdkrO|tjddƒ}nç|jjƒdkrm|}nÉ|jjƒdkr›|tjddƒ}n›|jj	|jƒ}|s×|j
dƒrò|j
dƒròtj|j
|dƒ‚nyè|j
dƒrFt|j
d	ƒƒ}t|j
d
ƒƒ}t|j
dƒƒ}n|j}|j}|j}|j
dƒrÊt|j
dƒƒ}	t|j
d
ƒƒ}
|j
dƒrÁt|j
dƒƒ}qÙd}nd\}	}
}Wn)tk
rtj|j
|dƒ‚nXtjd	|d
|d|d|	d
|
d|ƒ}|jƒztjt|ƒ|dƒ}Wd|jƒX||jƒkr—tj|j
|ƒ‚nt||ƒS(sòSpec for date revisions:
          date:value
          value can be 'yesterday', 'today', 'tomorrow' or a YYYY-MM-DD string.
          matches the first entry after a given date (either at midnight or
          at a specified time).
        t	yesterdaytdaysittodayttomorrowtdatettimesinvalid datetyeartmonthtdaythourtminutetsecondiN(iii(R¤tfromordinalR­R«t	toordinalR<tlowert	timedeltat_date_regexR=tgroupRRFRARxR¯R°R±R~RKtbisectR£RQRR(
R
RR)R«tdttmR¯R°R±R²R³R´R˜((s7/usr/lib/python2.7/dist-packages/bzrlib/revisionspec.pyREµsL
!	'				

(	R+R,R-R.RBRRsR¹RE(((s7/usr/lib/python2.7/dist-packages/bzrlib/revisionspec.pyR¨šs	tRevisionSpec_ancestorcB@sJeZdZdZdZd„Zd„Zed„ƒZed„ƒZ	RS(s/Selects a common ancestor with a second branch.s7Selects a common ancestor with a second branch.

    Supply the path to a branch to select the common ancestor.

    The common ancestor is the last revision that existed in both
    branches. Usually this is the branch point, but it could also be
    a revision that was merged.

    This is frequently used with 'diff' to return all of the changes
    that your branch introduces, while excluding the changes that you
    have not merged from the remote branch.

    Examples::

      ancestor:/path/to/branch
      $ bzr diff -r ancestor:../../mainline/branch
    s	ancestor:cC@s)tjd|j|ƒ|j||jƒS(Nsmatching ancestor: on: %s, %s(RR:R<t_find_revision_info(R
RR)((s7/usr/lib/python2.7/dist-packages/bzrlib/revisionspec.pyREscC@s|j||jƒS(N(t_find_revision_idR<(R
RV((s7/usr/lib/python2.7/dist-packages/bzrlib/revisionspec.pyRU
scC@s"tj||ƒ}t|d|ƒS(N(R¾RÀRR(Rtother_locationR(((s7/usr/lib/python2.7/dist-packages/bzrlib/revisionspec.pyR¿
s		cC@s1ddlm}|jƒztj|jƒƒ}|tjkrStj|ƒ‚n|dkrn|j	ƒ}n|j
|ƒ}|jƒzatj|jƒƒ}|tjkrÀtj|ƒ‚n|jj|jƒ}|j
||ƒ}Wd|jƒX|tjkrtj||ƒ‚n|SWd|jƒXdS(Ni(RRw(t
bzrlib.branchRRKROtensure_nullRNRPRR“t
get_parentR‚RRLtfind_unique_lcaRQtNoCommonAncestor(RRÁRt
revision_atother_brancht
revision_bRSR((s7/usr/lib/python2.7/dist-packages/bzrlib/revisionspec.pyRÀs*

(
R+R,R-R.RBRERUR0R¿RÀ(((s7/usr/lib/python2.7/dist-packages/bzrlib/revisionspec.pyR¾ðs		tRevisionSpec_branchcB@sSeZdZdZdZejfZd„Zd„Z	d„Z
d„Zd„ZRS(s0Selects the last revision of a specified branch.s¡Selects the last revision of a specified branch.

    Supply the path to a branch to select its last revision.

    Examples::

      branch:/path/to/branch
    sbranch:cC@s«ddlm}|j|jƒ}|jƒ}|dtjfkrUtj	|ƒ‚n|dkrj|}n1y|j
||ƒWntjk
rš|}nXt|d|ƒS(Ni(R(
RÂRR‚R<RNRRORPRR“tfetcht
ReadOnlyErrorR(R
RR)RRÈRÉ((s7/usr/lib/python2.7/dist-packages/bzrlib/revisionspec.pyRE?s	
cC@srddlm}|j|jƒ}|jƒ}tj|ƒ}|j||ƒ|tjkrnt	j
|ƒ‚n|S(Ni(R(RÂRR‚R<RNRORÃRËRPRR“(R
RVRRÈRN((s7/usr/lib/python2.7/dist-packages/bzrlib/revisionspec.pyRUOscC@snddlm}|j|jƒ}|jƒ}tj|ƒ}|tjkr^tj	|ƒ‚n|j
j|ƒS(Ni(R(RÂRR‚R<RNRORÃRPRR“RRZ(R
RVRRÈRN((s7/usr/lib/python2.7/dist-packages/bzrlib/revisionspec.pyRXYscC@stS(N(R(R
((s7/usr/lib/python2.7/dist-packages/bzrlib/revisionspec.pyR[bscC@s|jS(N(R<(R
((s7/usr/lib/python2.7/dist-packages/bzrlib/revisionspec.pyR\es(
R+R,R-R.RBRtNotBranchErrorR]RERURXR[R\(((s7/usr/lib/python2.7/dist-packages/bzrlib/revisionspec.pyRÊ1s			
			tRevisionSpec_submitcB@s5eZdZdZdZd„Zd„Zd„ZRS(s/Selects a common ancestor with a submit branch.s"Selects a common ancestor with the submit branch.

    Diffing against this shows all the changes that were made in this branch,
    and is a good predictor of what merge will do.  The submit branch is
    used by the bundle and merge directive commands.  If no submit branch
    is specified, the parent branch is used instead.

    The common ancestor is the last revision that existed in both
    branches. Usually this is the branch point, but it could also be
    a revision that was merged.

    Examples::

      $ bzr diff -r submit:
    ssubmit:cC@st|jƒ}d}|dkr3|jƒ}d}n|dkrQtj|ƒ‚ntjtdƒj||ƒƒ|S(Ns
submit branchs
parent branchs
Using {0} {1}(	tget_submit_branchRRÄRtNoSubmitBranchRtnotetgettexttformat(R
Rtsubmit_locationt
location_type((s7/usr/lib/python2.7/dist-packages/bzrlib/revisionspec.pyt_get_submit_locations	
cC@s/tjd|j|ƒ|j||j|ƒƒS(Nsmatching ancestor: on: %s, %s(RR:R<R¿RÖ(R
RR)((s7/usr/lib/python2.7/dist-packages/bzrlib/revisionspec.pyRE‹s	cC@s|j||j|ƒƒS(N(RÀRÖ(R
RV((s7/usr/lib/python2.7/dist-packages/bzrlib/revisionspec.pyRUs	(R+R,R-R.RBRÖRERU(((s7/usr/lib/python2.7/dist-packages/bzrlib/revisionspec.pyRÎjs		tRevisionSpec_annotatecB@s&eZdZdZd„Zd„ZRS(s	annotate:s?Select the revision that last modified the specified line.

    Select the revision that last modified the specified line.  Line is
    specified as path:number.  Path is a relative path to the file.  Numbers
    start at 1, and are relative to the current version, not the last-
    committed version of the file.
    cC@s tj|j|d|ƒ‚dS(NsNo such line: %s(RRFRA(R
t	numstringRV((s7/usr/lib/python2.7/dist-packages/bzrlib/revisionspec.pyt_raise_invalid¡scC@sM|jjddƒ\}}yt|ƒd}Wn!tk
rR|j||ƒnXtjj|ƒ\}}|jƒzf|j	|ƒ}|dkr²tj|j
|d|ƒ‚ng|j|ƒD]\}}	|^qÂ}
Wd|jƒXy|
|}Wn!tk
r|j||ƒnX|tjkrItj|j
|d|ƒ‚n|S(NRvisFile '%s' is not versioned.sLine %s has not been committed.(R<trsplitRxR~RÙtworkingtreetWorkingTreetopen_containingRKtpath2idRRRFRAt
annotate_iterRQRROtCURRENT_REVISION(R
RVtpathRØRttreet	file_pathtfile_idR—tltrevision_idsR(((s7/usr/lib/python2.7/dist-packages/bzrlib/revisionspec.pyRU¥s.


,
(R+R,RBR.RÙRU(((s7/usr/lib/python2.7/dist-packages/bzrlib/revisionspec.pyRוs	tRevisionSpec_mainlinecB@seZdZdZd„ZRS(sŒSelect mainline revision that merged the specified revision.

    Select the revision that merged the specified revision into mainline.
    s	mainline:cC@s£tj|jƒ}|jƒdkr-|}ntjj|jƒƒ}|j|ƒ}|j	j
ƒ}|j||jƒƒ}|dkrŸt
j|j|ƒ‚n|S(N(R2R@R<R\RR€RR‚RWRRLtfind_lefthand_mergerRNRRFRA(R
RVRmtspec_branchR(RStresult((s7/usr/lib/python2.7/dist-packages/bzrlib/revisionspec.pyRUÉs		(R+R,R.RBRU(((s7/usr/lib/python2.7/dist-packages/bzrlib/revisionspec.pyRçÀsiiRgcC@stj|j|ƒdS(N(R8tregisterRB(Rm((s7/usr/lib/python2.7/dist-packages/bzrlib/revisionspec.pyt_register_revspecäsN(iii($t
__future__Rtbzrlib.lazy_importRtglobalstbzrlibRRRRtobjectRR2R;RdtRevisionSpec_intRRŽR‘R•RžR£R¨R¾RÊRÎR×RçR$tdeprecated_listt
deprecated_inRgRntRegistryR8Rì(((s7/usr/lib/python2.7/dist-packages/bzrlib/revisionspec.pyt<module>sP	"P³Ge3EVA9++



	











Copyright © 2017 || Recoded By Mr.Bumblebee