-=[ Mr. Bumblebee ]=-
_Indonesia_

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

ó
ÒOc@@sHdZddlmZddlmZddlmZmZddlm	Z	ddl
mZddlm
Z
e
eƒdƒd	efd
„ƒYZdejfd„ƒYZd
efd„ƒYZdefd„ƒYZdejfd„ƒYZeƒZde	fd„ƒYZdefd„ƒYZd„Zdefd„ƒYZdS(sForeign branch utilities.i(tabsolute_import(tBranch(tCommandtOption(t
Repository(tRevision(tlazy_importse
from bzrlib import (
    errors,
    registry,
    transform,
    )
from bzrlib.i18n import gettext
t
VcsMappingcB@s;eZdZeZeZdZd„Zd„Z	d„Z
RS(sNDescribes the mapping between the semantics of Bazaar and a foreign VCS.

    cC@s
||_dS(s[Create a new VcsMapping.

        :param vcs: VCS that this mapping maps to Bazaar
        N(tvcs(tselfR((s2/usr/lib/python2.7/dist-packages/bzrlib/foreign.pyt__init__4scC@st|jƒ‚dS(sÁParse a bzr revision id and convert it to a foreign revid.

        :param bzr_revid: The bzr revision id (a string).
        :return: A foreign revision id, can be any sort of object.
        N(tNotImplementedErrortrevision_id_bzr_to_foreign(R	t	bzr_revid((s2/usr/lib/python2.7/dist-packages/bzrlib/foreign.pyR;scC@st|jƒ‚dS(s¶Parse a foreign revision id and convert it to a bzr revid.

        :param foreign_revid: Foreign revision id, can be any sort of object.
        :return: A bzr revision id.
        N(Rtrevision_id_foreign_to_bzr(R	t
foreign_revid((s2/usr/lib/python2.7/dist-packages/bzrlib/foreign.pyRCsN(t__name__t
__module__t__doc__tFalsetexperimentalt
roundtrippingtNonetrevid_prefixR
RR(((s2/usr/lib/python2.7/dist-packages/bzrlib/foreign.pyR&s		tVcsMappingRegistrycB@s2eZdZd„Zd„Zd„Zd„ZRS(szRegistry for Bazaar<->foreign VCS mappings.

    There should be one instance of this registry for every foreign VCS.
    cC@s8d|krtdƒ‚ntjj||||ƒdS(sÏRegister a mapping between Bazaar and foreign VCS semantics.

        The factory must be a callable that takes one parameter: the key.
        It must produce an instance of VcsMapping when called.
        t:s&mapping name can not contain colon (:)N(t
ValueErrortregistrytRegistrytregister(R	tkeytfactorythelp((s2/usr/lib/python2.7/dist-packages/bzrlib/foreign.pyRRscC@s|j|ƒdS(sySet the 'default' key to be a clone of the supplied key.

        This method must be called once and only once.
        N(t_set_default_key(R	R((s2/usr/lib/python2.7/dist-packages/bzrlib/foreign.pytset_default\scC@s|j|jƒƒS(s>Convenience function for obtaining the default mapping to use.(tgett_get_default_key(R	((s2/usr/lib/python2.7/dist-packages/bzrlib/foreign.pytget_defaultcscC@st|jƒ‚dS(s-Convert a bzr revision id to a foreign revid.N(RR(R	trevid((s2/usr/lib/python2.7/dist-packages/bzrlib/foreign.pyRgs(RRRRR"R%R(((s2/usr/lib/python2.7/dist-packages/bzrlib/foreign.pyRLs
	
		tForeignRevisioncB@seZdZd„ZRS(slA Revision from a Foreign repository. Remembers
    information about foreign revision id and mapping.

    cO@sHd|krd|d<ntt|ƒj||Ž||_||_dS(Ntinventory_sha1t(tsuperR'R
Rtmapping(R	RR+targstkwargs((s2/usr/lib/python2.7/dist-packages/bzrlib/foreign.pyR
rs

	(RRRR
(((s2/usr/lib/python2.7/dist-packages/bzrlib/foreign.pyR'lst
ForeignVcscB@s8eZdZdZdZdd„Zd„Zd„ZRS(s!A foreign version control system.cC@s||_||_dS(sÀCreate a new foreign vcs instance.

        :param mapping_registry: Registry with mappings for this VCS.
        :param abbreviation: Optional abbreviation ('bzr', 'svn', 'git', etc)
        N(tabbreviationtmapping_registry(R	R0R/((s2/usr/lib/python2.7/dist-packages/bzrlib/foreign.pyR
s	cC@siS(sºPrepare a foreign revision id for formatting using bzr log.

        :param foreign_revid: Foreign revision id.
        :return: Dictionary mapping string keys to string values.
        ((R	R((s2/usr/lib/python2.7/dist-packages/bzrlib/foreign.pytshow_foreign_revidŠscC@st|jƒ‚dS(sÈSerialize a foreign revision id for this VCS.

        :param foreign_revid: Foreign revision id
        :return: Bytestring with serialized revid, will not contain any 
            newlines.
        N(Rtserialize_foreign_revid(R	R((s2/usr/lib/python2.7/dist-packages/bzrlib/foreign.pyR2’sN(	RRRRt
branch_formattrepository_formatR
R1R2(((s2/usr/lib/python2.7/dist-packages/bzrlib/foreign.pyR.zs		tForeignVcsRegistrycB@s eZdZd„Zd„ZRS(sRegistry for Foreign VCSes.

    There should be one entry per foreign VCS. Example entries would be
    "git", "svn", "hg", "darcs", etc.

    cC@sDd|ksd|kr'tdƒ‚ntjj||||ƒdS(sÃRegister a foreign VCS.

        :param key: Prefix of the foreign VCS in revision ids
        :param foreign_vcs: ForeignVCS instance
        :param help: Description of the foreign VCS
        Rt-svcs name can not contain : or -N(RRRR(R	Rtforeign_vcsR ((s2/usr/lib/python2.7/dist-packages/bzrlib/foreign.pyR¤scC@sƒd|ksd|kr-tj|dƒ‚ny |j|jdƒdƒ}Wn#tk
rrtj|dƒ‚nX|jj|ƒS(s½Parse a bzr revision and return the matching mapping and foreign
        revid.

        :param revid: The bzr revision id
        :return: tuple with foreign revid and vcs mapping
        RR6iN(terrorstInvalidRevisionIdRR#tsplittKeyErrorR0R(R	R&R7((s2/usr/lib/python2.7/dist-packages/bzrlib/foreign.pytparse_revision_id¯s 
(RRRRR<(((s2/usr/lib/python2.7/dist-packages/bzrlib/foreign.pyR5œs	tForeignRepositorycB@s;eZdZdZd„Zd„Zdd„Zd„ZRS(sØA Repository that exists in a foreign version control system.

    The data in this repository can not be represented natively using
    Bazaars internal datastructures, but have to converted using a VcsMapping.
    cC@st|jƒ‚dS(sÂCheck whether the specified foreign revision is present.

        :param foreign_revid: A foreign revision id, in the format used
                              by this Repository's VCS.
        N(Rthas_foreign_revision(R	R((s2/usr/lib/python2.7/dist-packages/bzrlib/foreign.pyR>ÌscC@st|jƒ‚dS(s¨Lookup a mapped or roundtripped revision by revision id.

        :param revid: Bazaar revision id
        :return: Tuple with foreign revision id and mapping.
        N(Rtlookup_revision_id(R	R&((s2/usr/lib/python2.7/dist-packages/bzrlib/foreign.pytlookup_bzr_revision_idÔscC@st|jƒ‚dS(s"See Repository.all_revision_ids().N(Rtall_revision_ids(R	R+((s2/usr/lib/python2.7/dist-packages/bzrlib/foreign.pyRAÜscC@st|jƒ‚dS(s,Get the default mapping for this repository.N(Rtget_default_mapping(R	((s2/usr/lib/python2.7/dist-packages/bzrlib/foreign.pyRBàsN(	RRRRRR>R@RARB(((s2/usr/lib/python2.7/dist-packages/bzrlib/foreign.pyR=Âs		t
ForeignBranchcB@seZdZd„ZRS(s7Branch that exists in a foreign version control system.cC@s ||_tt|ƒjƒdS(N(R+R*RCR
(R	R+((s2/usr/lib/python2.7/dist-packages/bzrlib/foreign.pyR
ès	(RRRR
(((s2/usr/lib/python2.7/dist-packages/bzrlib/foreign.pyRCåsc	C@stj|ƒ}z­xœ|j|ƒD]‹\}}}}}}}	}
|ttfkru|j|dƒ}|j|ƒq"|ttfkr"|j|dƒ}|j||ƒq"q"W|jƒWd|j	ƒXt
|jƒƒdkr|j|j
ƒ|fgƒn|j|j
ƒƒdS(sÄUpdate the file ids in a working tree based on another tree.

    :param wt: Working tree in which to update file ids
    :param target_tree: Tree to retrieve new file ids from, based on path
    iiN(t	transformt
TreeTransformtiter_changestTrueRttrans_id_tree_pathtunversion_filetversion_filetapplytfinalizetlentget_parent_idstset_parent_treestget_revision_idtset_last_revision(twtttarget_treettttftptctvtdtntktettrans_id((s2/usr/lib/python2.7/dist-packages/bzrlib/foreign.pytupdate_workingtree_fileidsís.t	cmd_dpushc	B@sqeZdZdgZdeddddddeƒed	dd
ƒedddƒgZdededd
„Z	RS(súPush into a different VCS without any custom bzr metadata.

    This will afterwards rebase the local branch on the remote
    branch unless the --no-rebase option is used, in which case 
    the two branches will be out of sync after the push. 
    s	location?tremembert	directoryR sJBranch to push from, rather than the one containing the working directory.t
short_nameRYttypes	no-rebasesDo not rebase after push.tstrictsdRefuse to push if there are uncommitted changes in the working tree, --no-strict disables the check.cC@s”ddlm}ddlm}ddlm}m}	ddlm}
|dkr[d}ny |
j
|ƒd}|j}Wn&|	k
r£tj
|ƒ}d}nX|dk	rÏ|j|ddd	d
dƒn|jƒ}
|dkrC|
dkr|tdƒƒ‚qC|j|
|jjƒ}|jjtd
ƒ|ƒ|
}n|j
|ƒ}|jƒ}|jƒzy|j|dtƒ}Wn2tjk
r¸|tdƒj||ƒƒ‚nX|jƒdksÑ|rä|j|jƒn|sq|jƒ}|j|dtƒ|jƒ}|dk	rq||krq|jƒz&|jj j!|ƒ}t"||ƒWd|j#ƒXqqn|j$|jƒWd|j#ƒXdS(Ni(turlutils(t
ControlDir(tBzrCommandErrort
NoWorkingTree(tWorkingTreet.tdpush_strictt
more_errors"Use --no-strict to force the push.tmore_warnings'Uncommitted changes will not be pushed.s$No push location known or specified.sUsing saved location: %s
tlossysW{0!r} and {1!r} are in the same VCS, lossy push not necessary. Please use regular push.t	overwrite(%tbzrlibRetbzrlib.controldirRft
bzrlib.errorsRgRhtbzrlib.workingtreeRiRtopen_containingtbranchRtopentcheck_changed_or_out_of_datetget_push_locationtgettexttunescape_for_displaytoutftencodingtwritetopen_brancht
lock_writetpushRGR8tLossyPushToSameVCStformattset_push_locationtbaset
last_revisiontpullt
repositoryt
revision_treeR^tunlocktreport(R	tlocationR`Rat	no_rebaseRdReRfRgRhRit	source_wtt
source_brancht
stored_loctdisplay_urlt
controldirt
target_branchtpush_resulttold_last_revidtnew_last_revidttarget((s2/usr/lib/python2.7/dist-packages/bzrlib/foreign.pytrunsd	


	
			

	N(
RRRt
takes_argsRtunicodet
takes_optionsRRR—(((s2/usr/lib/python2.7/dist-packages/bzrlib/foreign.pyR_s				N(Rt
__future__Rt
bzrlib.branchRtbzrlib.commandsRRtbzrlib.repositoryRtbzrlib.revisionRtbzrlib.lazy_importRtglobalstobjectRRRRR'R.R5tforeign_vcs_registryR=RCR^R_(((s2/usr/lib/python2.7/dist-packages/bzrlib/foreign.pyt<module>s$	& "#	#	

Copyright © 2017 || Recoded By Mr.Bumblebee