-=[ Mr. Bumblebee ]=-
_Indonesia_

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


Qc@@s
ddlmZddlmZeedddlmZmZmZm	Z	m
Z
ddlmZm
Z
mZddlmZddlmZmZddlmZmZmZmZmZead	ejfd
YZdefdYZd
efdYZ dee!j"fdYZ#de#fdYZ$de!j%fdYZ&ej'Z(e&e(Z)de!j*fdYZ+dej,e+fdYZ-e)j.ddde)j.ddde)j.ddde)j.d d!d"e)j.d#d!d$e)j.d%d!d&e)j.d'd!d(e)j.d)d!d*e)j.d+d!d,e)j.d-d!d.e)j.d/d!d0e)j.d1d2d3e)j.d4d!d5e)j.d6d2d7d8efd9YZ/d:efd;YZ0d<Z1e2e2d=Z3d>efd?YZ4d@S(Ai(tabsolute_import(tlazy_importsE
import itertools
import time

from bzrlib import (
    config,
    controldir,
    debug,
    generate_ids,
    graph,
    lockable_files,
    lockdir,
    osutils,
    revision as _mod_revision,
    testament as _mod_testament,
    tsort,
    gpg,
    )
from bzrlib.bundle import serializer
from bzrlib.i18n import gettext
(tbzrdirterrorstregistrytsymbol_versioningtui(tneeds_read_locktneeds_write_locktonly_raises(tInterObject(t_RelockDebugMixintLogicalLockResult(tlog_exception_quietlytnotetmuttertmutter_callsitetwarningtIsInWriteGroupErrorcB@seZdZdZRS(s=May not refresh_data of repo %(repo)s while in a write group.cC@stjj|d|dS(Ntrepo(RtInternalBzrErrort__init__(tselfR((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pyR@s(t__name__t
__module__t_fmtR(((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pyR<st
CommitBuildercB@seZdZeZeZeZd
d
d
d
d
edZ	dZ
dZdZdZ
dZdZdZd	Zd
ZdZdZRS(sProvides an interface to build up a commit.

    This allows describing a tree to be committed without needing to
    know the internals of the format of the repository.
    c

C@s||_|	|_|dkr6|jjd|_n*t|tsW|j|_n	||_||_||_	||_
i|_|dk	r|j||jj
|n|dkrtj}nt|d|_|dkrtj|_nt||_|jdS(sRInitiate a CommitBuilder.

        :param repository: Repository to commit to.
        :param parents: Revision ids of the parents of the new revision.
        :param timestamp: Optional timestamp recorded for commit.
        :param timezone: Optional timezone for timestamp.
        :param committer: Optional committer to set for commit.
        :param revprops: Optional dictionary of revision properties.
        :param revision_id: Optional revision id.
        :param lossy: Whether to discard data that can not be natively
            represented, when pushing to a foreign VCS 
        temailiN(t
_config_stackt_lossytNonetgett
_committert
isinstancetunicodetdecodet_new_revision_idtparentst
repositoryt	_revpropst_validate_revpropstupdatettimetroundt
_timestamptosutilstlocal_time_offsett	_timezonetintt_generate_revision_if_needed(
RR&R%tconfig_stackt	timestampttimezonet	committertrevpropstrevision_idtlossy((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pyRSs*							
cC@st|jdS(sReturn True if any entries were changed.

        This includes merge-only changes. It is the core for the --unchanged
        detection in commit.

        :return: True if any changes have occured.
        N(tNotImplementedErrortany_changes(R((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pyR:scC@s)d|kr%td||fndS(s?Verify things like commit messages don't have bogus characters.s
sInvalid value for %s: %rN(t
ValueError(Rttexttcontext((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pyt_validate_unicode_textscC@s`xY|jD]K\}}t|tsAtd||fn|j|d|fq
WdS(Ns:revision property (%s) is not a valid (unicode) string: %rsrevision property (%s)(t	iteritemsR!t
basestringR;R>(RR6tkeytvalue((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pyR(s	cC@st|jdS(s\Make the actual commit.

        :return: The revision id of the recorded revision.
        N(R9tcommit(Rtmessage((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pyRCscC@st|jdS(s.Abort the commit that is being built.
        N(R9tabort(R((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pyREscC@st|jdS(sWReturn the tree that was just committed.

        After calling commit() this can be called to get a
        RevisionTree representing the newly committed tree. This is
        preferred to calling Repository.revision_tree() because that may
        require deserializing the inventory, while we already have a copy in
        memory.
        N(R9t
revision_tree(R((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pyRFs	cC@st|jdS(sTell the builder that the inventory is finished.

        :return: The inventory id in the repository, which can be used with
            repository.get_inventory.
        N(R9tfinish_inventory(R((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pyRGscC@stj|j|jS(sReturn new revision-id.(tgenerate_idstgen_revision_idR R,(R((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pyt_gen_revision_idscC@s7|jdkr*|j|_t|_n	t|_dS(sCreate a revision id if None was supplied.

        If the repository can not support user-specified revision ids
        they should override this function and raise CannotSetRevisionId
        if _new_revision_id is not None.

        :raises: CannotSetRevisionId
        N(R$RRJtTruetrandom_revidtFalse(R((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pyR1s	cC@st|jdS(sTell the commit builder that deletes are being notified.

        This enables the accumulation of an inventory delta; for the resulting
        commit to be valid, deletes against the basis MUST be recorded via
        builder.record_delete().
        N(R9twill_record_deletes(R((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pyRNscC@st|jdS(sRecord a new tree via iter_changes.

        :param tree: The tree to obtain text contents from for changed objects.
        :param basis_revision_id: The revision id of the tree the iter_changes
            has been generated against. Currently assumed to be the same
            as self.parents[0] - if it is not, errors may occur.
        :param iter_changes: An iter_changes iterator with the changes to apply
            to basis_revision_id. The iterator must not include any items with
            a current kind of None - missing items must be either filtered out
            or errored-on beefore record_iter_changes sees the item.
        :return: A generator of (file_id, relpath, fs_hash) tuples for use with
            tree._observed_sha1.
        N(R9trecord_iter_changes(Rttreetbasis_revision_idtiter_changes((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pyROsN(RRt__doc__RKtrecord_root_entryRMtsupports_record_entry_contentstupdates_branchRRR:R>R(RCRERFRGRJR1RNRO(((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pyRDs$	,	
		
								tRepositoryWriteLockResultcB@s eZdZdZdZRS(sThe result of write locking a repository.

    :ivar repository_token: The token obtained from the underlying lock, or
        None.
    :ivar unlock: A callable which will unlock the lock.
    cC@stj||||_dS(N(RRtrepository_token(RtunlockRX((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pyRscC@sd|j|jfS(Ns!RepositoryWriteLockResult(%s, %s)(RXRY(R((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pyt__repr__s	(RRRSRRZ(((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pyRWs	t
RepositorycB@seZdZedZdZdZdZdZdZ	dZ
edZd	Z
ed
ZedZdZd
ZdZdZdZdZdQdZdZdZdZdZedQdQdZedZee j!e"dQdQdQdZ#edZ$dQdZ%dZ&dZ'dZ(dZ)d Z*d!Z+dQed"Z,dQd#Z-dQdQdQdQdQed$Z.e/e0j1e0j2d%Z3edQd&Z4d'Z5d(Z6edQd)Z7d*Z8ed+Z9ed,Z:ed-Z;d.Z<d/Z=dQd0Z>edQd1Z?e@d2ZAd3ZBd4ZCd5ZDd6ZEd7ZFe@dQed8ZGd9ZHed:ZId;ZJdQed<ZKd=ZLd>ZMd?ZNd@ZOdAZPedBZQdCZRdQdDZSe@dEZTdFZUe@dGZVedHZWedIZXdJZYdKZZdQdQe"dLZ[dQdQe"dMZ\dQdNZ]dOZ^dPZ_RS(RsRepository holding history for one or more branches.

    The repository holds and retrieves historical information including
    revisions and file history.  It's normally accessed only by the Branch,
    which views a particular line of development through that history.

    See VersionedFileRepository in bzrlib.vf_repository for the
    base class for most Bazaar repositories.
    cC@s|j|jk	r]|r8td|j|jdStjd|j|jfny|jWnLtk
r}d|_|sntdtt	t
d|nXd|_dS(s=Commit the contents accrued within the current write group.

        :param suppress_errors: if true, abort_write_group will catch and log
            unexpected errors that happen during the abort, rather than
            allowing them to propagate.  Defaults to False.

        :seealso: start_write_group.
        s<(suppressed) mismatched lock context and write group. %r, %rNs/mismatched lock context and write group. %r, %rsabort_write_group failedsbzr: ERROR (ignored): %s(t_write_grouptget_transactionRRtBzrErrort_abort_write_groupt	ExceptionRR
Rtgettext(Rtsuppress_errorstexc((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pytabort_write_groups&		
cC@sdS(ssTemplate method for per-repository write group cleanup.

        This is called during abort before the write group is considered to be
        finished and should cleanup any internal state accrued during the write
        group. There is no requirement that data handed to the repository be
        *not* made available - this is not a rollback - but neither should any
        attempt be made to ensure that data added is fully commited. Abort is
        invoked when an error has occured so futher disk or network operations
        may not be possible or may error and if possible should not be
        attempted.
        N((R((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pyR_$scC@st|jdS(spAdd a repository to use for looking up data not held locally.

        :param repository: A repository.
        N(R9tadd_fallback_repository(RR&((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pyRe1scC@stj||S(sCheck that this repository can fallback to repository safely.

        Raise an error if not.

        :param repository: A repository to fallback to.
        (tInterRepositoryt_assert_same_model(RR&((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pyt_check_fallback_repository8scC@s)dtjkrtddn|jS(s7Returns a list of all the revision ids in the repository.

        This is conceptually deprecated because code should generally work on
        the graph reachable from a particular revision, and ignore any other
        revisions that might be present.  There is no direct replacement
        method.
        tevilis(all_revision_ids is linear with history.(tdebugtdebug_flagsRt_all_revision_ids(R((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pytall_revision_idsAscC@st|jdS(sReturns a list of all the revision ids in the repository.

        These are in as much topological order as the underlying store can
        present.
        N(R9Rl(R((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pyRlMscC@s|jjdS(sBreak a lock if one is present from another instance.

        Uses the ui factory to ask for confirmation if the lock may be from
        an active process.
        N(t
control_filest
break_lock(R((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pyRoUscC@stjj|S(s>Construct the current default format repository in controldir.(tRepositoryFormattget_default_formatt
initialize(t
controldir((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pytcreate]scC@sDtt|j||_||_||_d|_g|_dS(sinstantiate a Repository.

        :param _format: The format of the repository on disk.
        :param controldir: The ControlDir of the repository.
        :param control_files: Control files to use for locking, etc.
        N(	tsuperR[Rt_formatRRnRR\t_fallback_repositories(RRvRsRn((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pyRbs
				cC@s
|jjS(N(Rtuser_transport(R((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pyRxvscC@s|jS(N(t
_transport(R((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pytcontrol_transportzscC@sA|jr&d|jj|j|jfSd|jj|jfSdS(Ns %s(%r, fallback_repositories=%r)s%s(%r)(Rwt	__class__Rtbase(R((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pyRZ~s		cC@se|j}|j}t|t|kr.tSx0t||D]\}}|j|s>tSq>WtS(s9Returns true if the repositories have the same fallbacks.(RwtlenRMtzipthas_same_locationRK(Rt
other_repotmy_fbtother_fbtftg((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pyt_has_same_fallbackss		cC@s&|j|jk	rtS|j|jkS(sReturns a boolean indicating if this repository is at the same
        location as another repository.

        This might return False even when two repository objects are accessing
        the same physical repository via different URLs.
        (R{RMtcontrol_url(Rtother((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pyRscC@s
|jdk	S(s[Return True if there is an open write group.

        :seealso: start_write_group.
        N(R\R(R((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pytis_in_write_groupscC@s
|jjS(N(Rnt	is_locked(R((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pyRscC@s|jo|jjdkS(s+Return True if this object is write locked.tw(RRnt
_lock_mode(R((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pytis_write_lockedscC@sy|j}|jjd|}|si|j|jdx|jD]}|jqHW|jnt|j	|S(sLock this repository for writing.

        This causes caching within the repository obejct to start accumlating
        data during reads, and allows a 'write_group' to be obtained. Write
        groups must be used for actual data insertion.

        A token should be passed in if you know that you have locked the object
        some other way, and need to synchronise this object's state with that
        fact.

        XXX: this docstring is duplicated in many places, e.g. lockable_files.py

        :param token: if this is already locked, then lock_write will fail
            unless the token matches the existing lock.
        :returns: a token if this instance supports tokens, otherwise None.
        :raises TokenLockingNotSupported: when a token is given but this
            instance doesn't support using token locks.
        :raises MismatchedToken: if the specified token doesn't match the token
            of the existing lock.
        :seealso: start_write_group.
        :return: A RepositoryWriteLockResult.
        ttokenR(
RRnt
lock_writet_warn_if_deprecatedt
_note_lockRwt	lock_readt
_refresh_dataRWRY(RRtlockedR((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pyRs


cC@sn|j}|jj|sa|j|jdx|jD]}|jq@W|jnt|jS(sLock the repository for read operations.

        :return: An object with an unlock method which will release the lock
            obtained.
        tr(	RRnRRRRwRRRY(RRR((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pyRs



cC@s
|jjS(N(Rntget_physical_lock_status(R((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pyRscC@s|jjdS(sTell this repository not to release the physical lock when this
        object is unlocked.

        If lock_write doesn't return a token, then this method is not supported.
        N(Rntleave_in_place(R((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pytleave_lock_in_placescC@s|jjdS(sTell this repository to release the physical lock when this
        object is unlocked, even if it didn't originally acquire it.

        If lock_write doesn't return a token, then this method is not supported.
        N(Rntdont_leave_in_place(R((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pytdont_leave_lock_in_placescC@sCi}|r|rd|d<n|r?|tjkr?|j}|rRt}ng|j|gD]!\}}|tjkre|^qe}d}	|s|d|df}nx?|j|D].}
|	s|
}	n|r|j|
jqqW|
}|rt	||d<n|j
|jf|d<|	j
|	jf|d<n|S(shGather statistics from a revision id.

        :param revid: The revision id to gather statistics from, if None, then
            no revision specific statistics are gathered.
        :param committers: Optional parameter controlling whether to grab
            a count of committers from the revision specific statistics.
        :return: A dictionary of statistics. Currently this contains:
            committers: The number of committers if requested.
            firstrev: A tuple with timestamp, timezone for the penultimate left
                most ancestor of revid, if revid is not the NULL_REVISION.
            latestrev: A tuple with timestamp, timezone for revid, if revid is
                not the NULL_REVISION.
            revisions: The total revision count in the repository.
            size: An estimate disk size of the repository in bytes.
        it
committersitfirstrevt	latestrevN(t
_mod_revisiont
NULL_REVISIONt	get_graphtsett
iter_ancestryRt
get_revisionstaddR5R}R3R4(RtrevidRtresulttgraphtall_committersRtpt	revisionst
last_revisiontrevisiontfirst_revision((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pytgather_statss2
	cC@s|r |jr |jjSdtfdY}g}xqtjj|jd|D]Q\}}|dk	r|j	|n|r[|dk	r[|j	|j
q[q[W|S(sFind branches underneath this repository.

        This will include branches inside other branches.

        :param using: If True, list only branches using this repository.
        t	EvaluatorcB@seZdZdZRS(cS@s
t|_dS(N(RKt
first_call(R((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pyR(scS@sh|jsCy|j}Wntjk
r/qCXtg|ffSnt|_|jdf}t|fS(N(Rtopen_repositoryRtNoRepositoryPresentRMt
list_branchesRRK(RRsR&RB((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pyt__call__+s		(RRRR(((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pyR&s	tevaluateN(t	is_sharedRRtobjectRst
ControlDirtfind_bzrdirsRxRtextendt
find_branches(RtusingRtrettbranchesR&((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pyRs
c	C@stj|r[tjdtdd|d	k	r@tdn|d	k	r[|g}q[ntj||jd|d|d|d|S(
sReturn the revision ids that other has that this does not.

        These are returned in topological order.

        revision_id: only return revision ids included by revision_id.
        sdsearch_missing_revision_ids(revision_id=...) was deprecated in 2.4.  Use revision_ids=[...] instead.t
stacklevelis3revision_ids is mutually exclusive with revision_idtfind_ghoststrevision_idstif_present_idstlimitN(	Rtdeprecated_passedtwarntDeprecationWarningRtAssertionErrorRfRtsearch_missing_revision_ids(RRR7RRRR((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pyRBs
cC@stjj|}|jS(sOpen the repository rooted at base.

        For instance, if the repository is at URL/.bzr/repository,
        Repository.open(URL) -> a Repository instance.
        (RsRtopenR(R|tcontrol((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pyR[scC@stj||j|S(sMake a complete copy of the content in self into destination.

        This is a destructive operation! Do not use it on existing
        repositories.
        (RfRtcopy_content(RtdestinationR7((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pytcopy_content_intoescC@sS|j|jk	r:tjd|j|jfn|j}d|_|S(sCommit the contents accrued within the current write group.

        :seealso: start_write_group.
        
        :return: it may return an opaque hint that can be passed to 'pack'.
        s.mismatched lock context %r and write group %r.N(R\R]RR^t_commit_write_groupR(RR((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pytcommit_write_groupms		cC@sdS(sRTemplate method for per-repository write group cleanup.

        This is called before the write group is considered to be
        finished and should ensure that all data handed to the repository
        for writing during the write group is safely committed (to the
        extent possible considering file system caching etc).
        N((R((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pyR}scC@stj|dS(sSuspend a write group.

        :raise UnsuspendableWriteGroup: If the write group can not be
            suspended.
        :return: List of tokens
        N(RtUnsuspendableWriteGroup(R((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pytsuspend_write_groupscC@s|jdS(s4Re-read any data needed to synchronise with disk.

        This method is intended to be called after another repository instance
        (such as one used by a smart server) has inserted data into the
        repository. On all repositories this will work outside of write groups.
        Some repository formats (pack and newer for bzrlib native formats)
        support refresh_data inside write groups. If called inside a write
        group on a repository that does not support refreshing in a write group
        IsInWriteGroupError will be raised.
        N(R(R((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pytrefresh_datascC@sY|jstj|n|jr9tjdn|j||j|_dS(Nsalready in a write group(RRtNotWriteLockedR\R^t_resume_write_groupR](Rttokens((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pytresume_write_groups	
cC@stj|dS(N(RR(RR((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pyRscC@s|jrtjdn|j|rr|j|rr|dk	rhtj|rh|j|ndgfSt	j
||}|jd|d|S(sFetch the content required to construct revision_id from source.

        If revision_id is None, then all content is copied.

        fetch() may not be used when the repository is in a write group -
        either finish the current write group before using fetch, or use
        fetch before starting the write group.

        :param find_ghosts: Find and copy revisions in the source that are
            ghosts in the target (and not reachable directly by walking out to
            the first-present revision in target from revision_id).
        :param revision_id: If specified, all the content needed for this
            revision ID will be copied to the target.  Fetch will determine for
            itself which content needs to be copied.
        s%May not fetch while in a write group.iR7RN(RRRRRRRtis_nulltget_revisionRfRtfetch(RtsourceR7Rtinter((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pyRs
cC@stj|||||S(N(t
serializertwrite_bundle(RttargetR|tfileobjtformat((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pyt
create_bundlesc

C@st|jdS(sObtain a CommitBuilder for this repository.

        :param branch: Branch to commit to.
        :param parents: Revision ids of the parents of the new revision.
        :param config_stack: Configuration stack to use.
        :param timestamp: Optional timestamp recorded for commit.
        :param timezone: Optional timezone for timestamp.
        :param committer: Optional committer to set for commit.
        :param revprops: Optional dictionary of revision properties.
        :param revision_id: Optional revision id.
        :param lossy: Whether to discard data that can not be natively
            represented, when pushing to a foreign VCS
        N(R9tget_commit_builder(
RtbranchR%R2R3R4R5R6R7R8((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pyRscC@s|jjdkr_|jjdkr_|jdk	r_|j|jjtjdq_n|jj|jjdkrx|j	D]}|jqWndS(NiRs3Must end write groups before releasing write locks.i(
Rnt_lock_countRR\RRdRYRR^Rw(RR((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pyRYs


cC@s/|j|d|j}|j|||S(s
Clone this repository into controldir using the current format.

        Currently no check is made that the format of this repository and
        the bzrdir format are compatible. FIXME RBC 20060201.

        :return: The newly created destination repository.
        tshared(t_create_sprouting_repoRR(RRsR7t	dest_repo((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pytclonescC@sV|jstj|n|jr9tjdn|j|j|_dS(sStart a write group in the repository.

        Write groups are used by repositories which do not have a 1:1 mapping
        between file ids and backend store to manage the insertion of data from
        both fetch and commit operations.

        A write lock is required around the start_write_group/commit_write_group
        for the support of lock-requiring repository formats.

        One can only insert data into a repository inside a write group.

        :return: None.
        salready in a write groupN(RRRR\R^t_start_write_groupR](R((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pytstart_write_groups	
cC@sdS(sTemplate method for per-repository write group startup.

        This is called before the write group is considered to be
        entered.
        N((R((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pyRscC@s,|j|dt}|j|d||S(sCreate a descendent repository for new development.

        Unlike clone, this does not copy the settings of the repository.
        RR7(RRMR(Rt	to_bzrdirR7R((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pytsproutscC@smt|j|jjjs*|j}n?y|jj|d|}Wn tjk
rh|j}nX|S(NR(	R!RvRR{tcreate_repositoryRrRtUninitializableFormatR(Rta_bzrdirRR((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pyR#scC@s||j|fkS(s3True if this repository has a copy of the revision.(t
has_revisions(RR7((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pythas_revision0scC@st|jdS(sProbe to find out the presence of multiple revisions.

        :param revision_ids: An iterable of revision_ids.
        :return: A set of the revision_ids that were present.
        N(R9R(RR((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pyR5scC@s|j|gdS(s0Return the Revision object for a named revision.i(R(RR7((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pyR>scC@st|jdS(sV'reconcile' helper routine that allows access to a revision always.

        This variant of get_revision does not cross check the weave graph
        against the revision one as get_revision does: but it should only
        be used by reconcile, or reconcile-alike commands that are correcting
        or testing the revision graph.
        N(R9tget_revision_reconcile(RR7((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pyRCscC@st|jdS(sGet many revisions at once.
        
        Repositories that need to check data on every revision read should 
        subclass this method.
        N(R9R(RR((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pyRMscc@st}x2|D]*}|j|j|j|jd qW|dkrltd|j|D}n"td|j||D}xR|D]J}|js|j	t
j}n||jd}||jj|VqWdS(sProduce a generator of revision deltas.

        Note that the input is a sequence of REVISIONS, not revision_ids.
        Trees will be held in memory until the generator exits.
        Each delta is relative to the revision's lefthand predecessor.

        :param specific_fileids: if not None, the result is filtered
          so that only those file-ids, their parents and their
          children are included.
        ics@s!|]}|j|fVqdS(N(tget_revision_id(t.0tt((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pys	<genexpr>mscs@s!|]}|j|fVqdS(N(R(RR((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pys	<genexpr>psiN(
RRR7R)t
parent_idsRtdicttrevision_treest_filtered_revision_treesRFRRtchanges_from(RRtspecific_fileidstrequired_treesRttreestold_tree((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pytget_deltas_for_revisionsUs	
			
	cC@s/|j|}t|j|gd|dS(s&Return the delta for one revision.

        The delta is relative to the left-hand predecessor of the
        revision.

        :param specific_fileids: if not None, the result is filtered
          so that only those file-ids, their parents and their
          children are included.
        Ri(RtlistR(RR7RR((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pytget_revision_delta|scC@s#|j|}|j||dS(N(tsigntadd_signature_text(Rtgpg_strategyt	plaintextR7t	signature((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pytstore_revision_signaturescC@st|jdS(sStore a signature text for a revision.

        :param revision_id: Revision id of the revision
        :param signature: Signature text.
        N(R9R(RR7R((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pyRscC@sO|j|}t}t|j|j|j||jtj|S(sFind all parent ids that are mentioned in the revision graph.

        :return: set of revisions that are parents of revision_ids which are
            not part of revision_ids themselves
        (	tget_parent_mapRtmapR)t
itervaluestdifference_updatetdiscardRR(RRt
parent_mapR((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pyt_find_parent_ids_of_revisionss	
cC@st|jdS(s)Iterate through file versions.

        Files will not necessarily be returned in the order they occur in
        desired_files.  No specific order is guaranteed.

        Yields pairs of identifier, bytes_iterator.  identifier is an opaque
        value supplied by the caller as part of desired_files.  It should
        uniquely identify the file version in the caller's context.  (Examples:
        an index number or a TreeTransform trans_id.)

        :param desired_files: a list of (file_id, revision_id, identifier)
            triples
        N(R9titer_files_bytes(Rt
desired_files((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pyRsc	C@s|\}}|g}||}|dkrDtd||fnyt||d|Wn;tjk
r}|j|krn|j|jnXt||kr|t|d}t||dffSt|d|krtdnt	|dfS(s$Return the revision id of a revno, given a later (revno, revid)
        pair in the same history.

        :return: if found (True, revid).  If the available history ran out
            before reaching the revno, then this returns
            (False, (closest_revno, closest_revid)).
        is9requested revno (%d) is later than given known revno (%d)t
stop_indexiis)_iter_for_revno returned too much history(
R;t_iter_for_revnoRtRevisionNotPresentR7tappendR}RMRRK(	Rtrevnot
known_pairtknown_revnotknown_revidtpartial_historytdistance_from_knownterrtearliest_revno((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pytget_rev_id_for_revnos(	
cC@st|jdS(sAReturn True if this repository is flagged as a shared repository.N(R9R(R((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pyRscC@s0ddlm}||d|}|j|S(sReconcile this repository.i(tRepoReconcilertthorough(tbzrlib.reconcileRt	reconcile(RRRRt
reconciler((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pyR s
cC@sdS(sHelper called from lock_* to ensure coherency with disk.

        The default implementation does nothing; it is however possible
        for repositories to maintain loaded indices across multiple locks
        by checking inside their implementation of this method to see
        whether their indices are still valid. This depends of course on
        the disk format being validatable in this manner. This method is
        also called by the refresh_data() public interface to cause a refresh
        to occur while in a write lock so that data inserted by a smart server
        push operation is visible on the client's instance of the physical
        repository.
        N((R((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pyRscC@st|jdS(s|Return Tree for a revision on this branch.

        `revision_id` may be NULL_REVISION for the empty tree revision.
        N(R9RF(RR7((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pyRFscC@st|jdS(sReturn Trees for revisions in this repository.

        :param revision_ids: a sequence of revision-ids;
          a revision-id may not be None or 'null:'
        N(R9R(RR((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pyRscC@sdS(smCompress the data within the repository.

        This operation only makes sense for some repository types. For other
        types it should be a no-op that just returns.

        This stub method does not require a lock, but subclasses should use
        @needs_write_lock as this is a long running call it's reasonable to
        implicitly lock for the user.

        :param hint: If not supplied, the whole repository is packed.
            If supplied, the repository may use the hint parameter as a
            hint for the parts of the repository to pack. A hint can be
            obtained from the result of commit_write_group(). Out of
            date hints are simply ignored, because concurrent operations
            can obsolete them rapidly.

        :param clean_obsolete_packs: Clean obsolete packs immediately after
            the pack operation.
        N((Rthinttclean_obsolete_packs((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pytpackscC@s
|jjS(N(RnR](R((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pyR]scC@st|jdS(s/See graph.StackedParentsProvider.get_parent_mapN(R9R(RR((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pyRscC@sg}i}xU|D]M}|tjkr5d||<q|dkrPtdq|j|fqW|jj}xe|j|jD]N\\}}|rt	g|D]\}|^q||<qtjf||<qW|S(sASame as Repository.get_parent_map except doesn't query fallbacks.s!get_parent_map(None) is not valid(N(
RRRR;RRtwithout_fallbacksRR?ttuple(RRt
query_keysRR7tvftparent_keystparent_revid((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pyt_get_parent_map_no_fallbackss 

"#cC@s2|jjs|Stjt|jg|jS(N(Rvtsupports_external_lookupsRtStackedParentsProvidert
_LazyListJoint _make_parents_provider_unstackedRw(R((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pyt_make_parents_provider5s
	cC@stj|jS(N(Rt CallableToParentsProviderAdapterR+(R((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pyR/<scC@st|jdS(sNReturn the known graph for a set of revision ids and their ancestors.
        N(R9tget_known_graph_ancestry(RR((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pyR2@scC@st|jdS(s"Return the graph walker for files.N(R9tget_file_graph(R((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pyR3FscC@sS|j}|dk	rF|j|rFtj||jg}ntj|S(s2Return the graph walker for this repository formatN(R0RRRR-tGraph(Rtother_repositorytparents_provider((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pyRJscC@st|jdS(s&Set the policy flag for making working trees when creating branches.

        This only applies to branches that use this repository.

        The default is 'True'.
        :param new_value: True to restore the default, False to disable making
                          working trees.
        N(R9tset_make_working_trees(Rt	new_value((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pyR7Ss
cC@st|jdS(s<Returns the policy for making working trees on new branches.N(R9tmake_working_trees(R((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pyR9_scC@s8tjj||}|j}|j|||dS(N(t_mod_testamentt	Testamentt
from_revisiont
as_short_textR(RR7Rt	testamentR((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pyt
sign_revisioncscC@s\|j|stjdfS|j|}tjj||}|j}|j	||S(sVerify the signature on a revision.

        :param revision_id: the revision to verify
        :gpg_strategy: the GPGStrategy object to used

        :return: gpg.SIGNATURE_VALID or a failed SIGNATURE_ value
        N(
thas_signature_for_revision_idtgpgtSIGNATURE_NOT_SIGNEDRtget_signature_textR:R;R<R=tverify(RR7RRR>R((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pytverify_revision_signatureis	
cc@s;x4|D],}|j||\}}|||fVqWdS(sVerify revision signatures for a number of revisions.

        :param revision_id: the revision to verify
        :gpg_strategy: the GPGStrategy object to used
        :return: Iterator over tuples with revision id, result and keys
        N(RE(RRRRRRA((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pytverify_revision_signatures{s
cC@st|jdS(sAQuery for a revision signature for revision_id in the repository.N(R9R@(RR7((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pyR@scC@st|jdS(s Return the text for a signature.N(R9RC(RR7((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pyRCscC@s|jd|d|d|S(spCheck consistency of all history of given revision_ids.

        Different repository implementations should override _check().

        :param revision_ids: A non-empty list of revision_ids whose ancestry
             will be checked.  Typically the last revision_id of a branch.
        :param callback_refs: A dict of check-refs to resolve and callback
            the check/_check method on the items listed as wanting the ref.
            see bzrlib.check.
        :param check_repo: If False do not check the repository contents, just 
            calculate the data callback_refs requires and call them back.
        Rt
callback_refst
check_repo(t_check(RRRGRH((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pytchecks
cC@st|jdS(N(R9RJ(RRRGRH((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pyRIscC@s|jjsdStrdSzd|dkr;tj}n|j}d|jdkr`dStd|j|j	j
jfWdtaXdS(Ntformat_deprecationtsuppress_warningssSFormat %s for %s is deprecated - please use 'bzr upgrade' to get better performance(
Rvt
is_deprecatedt_deprecation_warning_doneRtconfigtGlobalStacktget_config_stackRRRt	transportR|RK(RRtconf((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pyRscC@s
|jjS(N(Rvtrich_root_data(R((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pytsupports_rich_rootscC@s|dk	rt|trUy|jdWqtk
rQtj||qXqy|jdWqtk
rtj||qXndS(s+Private helper for ascii-only repositories.tasciiN(	RR!R"tencodetUnicodeEncodeErrorRtNonAsciiRevisionIdR#tUnicodeDecodeError(RR7tmethod((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pyt_check_ascii_revisionids

N(`RRRSRMRdR_ReRhRmRlRotstaticmethodRtRtpropertyRxRzRZRRRRRRRRRRRRRRRtDEPRECATED_PARAMETERRKRRRRRRRRRRRRR	RtLockNotHeldt
LockBrokenRYRRRRRRRRRRRRRRRR
RRRR RRFRR$R]RR+R0R/R2R3RR7R9R?RERFR@RCRJRIRRUR\(((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pyR[s		
								
					"				+%	
						
			!					
		
	'		
		#														tMetaDirRepositorycB@sGeZdZdZdZedZdZedZRS(sRepositories in the new meta-dir layout.

    :ivar _transport: Transport for access to repository control files,
        typically pointing to .bzr/repository.
    cC@s,tt|j||||j|_dS(N(RuRbRRy(RRvRRn((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pyRscC@s|jjdS(sAReturn True if this repository is flagged as a shared repository.sshared-storage(Rythas(R((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pyRscC@sZ|r4y|jjdWqVtjk
r0qVXn"|jjddd|jjdS(s&Set the policy flag for making working trees when creating branches.

        This only applies to branches that use this repository.

        The default is 'True'.
        :param new_value: True to restore the default, False to disable making
                          working trees.
        sno-working-treesttmodeN(RytdeleteRt
NoSuchFilet	put_bytesRt_get_file_mode(RR8((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pyR7s
cC@s|jjdS(s<Returns the policy for making working trees on new branches.sno-working-trees(RyRc(R((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pyR9scC@s0|jj||jjd|jjdS(sUpdate the feature flags for this branch.

        :param updated_flags: Dictionary mapping feature names to necessities
            A necessity can be None to indicate the feature should be removed
        RN(Rvt_update_feature_flagsRzRht	as_string(Rt
updated_flags((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pytupdate_feature_flagss(	RRRSRRRR7R9Rm(((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pyRbs			tRepositoryFormatRegistrycB@seZdZdZRS(sRepository format registry.cC@stjjdjS(s"Return the current default format.tdefault(Rstformat_registrytmake_bzrdirtrepository_format(R((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pytget_defaults(RRRSRs(((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pyRnsRpcB@seZdZdZdZdZeZdZ	eZ
dZeZdZ
dZdZeZdZdZdZdZdZdZdZdZdZedZdZdZdZd	Zed
Z dZ!RS(
s
A repository format.

    Formats provide four things:
     * An initialization routine to construct repository data on disk.
     * a optional format string which is used when the BzrDir supports
       versioned children.
     * an open routine which returns a Repository instance.
     * A network name for referring to the format in smart server RPC
       methods.

    There is one and only one Format subclass for each on-disk format. But
    there can be one Repository subclass that is used for several different
    formats. The _format attribute on a Repository instance can be used to
    determine the disk format.

    Formats are placed in a registry by their format string for reference
    during opening. These should be subclasses of RepositoryFormat for
    consistency.

    Once a format is deprecated, just deprecate the initialize and open
    methods on the format class. Do not deprecate the object, as the
    object may be created even when a repository instance hasn't been
    created.

    Common instance attributes:
    _matchingbzrdir - the controldir format that the repository format was
    originally written to work with. This can be used if manually
    constructing a bzrdir and repository, or more commonly for test suite
    parameterization.
    cC@sd|jjS(Ns%s()(R{R(R((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pyRZdscC@st||jS(N(R!R{(RR((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pyt__eq__gscC@s||kS(N((RR((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pyt__ne__kscC@st|jdS(s-Return the short description for this format.N(R9tget_format_description(R((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pyRvnscC@st|jdS(stInitialize a repository of this format in controldir.

        :param controldir: The controldir to put the new repository in it.
        :param shared: The repository should be initialized as a sharable one.
        :returns: The new repository object.

        This may raise UninitializableFormat if shared repository are not
        compatible the controldir.
        N(R9Rr(RRsR((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pyRrrs
cC@stS(sIs this format supported?

        Supported formats must be initializable and openable.
        Unsupported formats may not support initialization or committing or
        some other features depending on the reason for not being supported.
        (RK(R((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pytis_supported~scC@stS(sIs this format deprecated?

        Deprecated formats may trigger a user-visible warning recommending
        the user to upgrade. They are still fully supported.
        (RM(R((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pyRMscC@st|jdS(sTA simple byte string uniquely identifying this format for RPC calls.

        MetaDir repository formats use their disk format string to identify the
        repository over the wire. All in one formats such as bzr < 0.8, and
        foreign formats like svn/git and hg should use some marker which is
        unique and immutable.
        N(R9tnetwork_name(R((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pyRxscC@si|jr.|jr.tjd|d|n|jret|dtretjd|d|ndS(Ns Does not support rich root data.tfrom_formattsupports_tree_referencesDoes not support nested trees(RTRtBadConversionTargetRztgetattrRM(Rt
target_format((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pytcheck_conversion_targets			cC@st|jdS(ssReturn an instance of this format for a controldir.

        _found is a private parameter, do not use it.
        N(R9R(RRst_found((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pyRsc	C@saddlm}m}|jd}|s-dS|||||}x|D]}||qIWdS(Ni(RtRepoInitHookParamstpost_repo_init(tbzrlib.controldirRRthooks(	RR&RsRRRRtparamsthook((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pyt_run_post_repo_init_hookss

N("RRRSRtsupports_ghostsR,t
supports_chksRMt_fetch_reconciletfast_deltastpack_compressesRztexperimentaltsupports_funky_characterstsupports_leaving_locktsupports_full_versioned_filesRKtsupports_revision_signaturest%revision_graph_can_have_wrong_parentsRTtsupports_versioned_directoriestsupports_nesting_repositoriestsupports_unreferenced_revisionsRZRtRuRvRrRwRMRxR~RR(((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pyRps:								
	tRepositoryFormatMetaDircB@steZdZeZeZeZeZeZ	e
dZdZdZ
dZedZeddZRS(sDCommon base class for the new repositories using the metadir layout.cC@stj}||_|S(N(RtBzrDirMetaFormat1Rr(Rtmatching((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pyt_matchingbzrdirs	cC@s!tj|tjj|dS(N(RpRRt	BzrFormat(R((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pyRs
cC@s5|j|}tj|dtj}|j|S(s?Create the required files and the initial control_files object.tlock(tget_repository_transporttlockable_filest
LockableFilestlockdirtLockDirtcreate_lock(RRtrepository_transportRn((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pyt_create_control_filess
	
cC@s|j|}|j|j}|tkr>|dg7}nz|j|d|jx0|D](\}}	|j||	d|jqaWx0|D](\}}
|j||
d|jqWWd|j	XdS(s!Upload the initial blank content.sshared-storageRdReN(sshared-storageRd(
RRRyRKtmkdir_multit
_get_dir_modetput_fileRitput_bytes_non_atomicRY(RRtdirstfilest
utf8_filesRRnRRtfilenametcontent_streamt
content_bytes((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pyt_upload_blank_contents
	cC@s[y"|jd}|jd}Wn#tjk
rGtj|nX|jtd|S(sReturn the format for the repository object in a_bzrdir.

        This is used by bzr native formats that have a "format" file in
        the repository.  Other methods may be used by different types of
        control directory.
        RR&N(RRt	get_bytesRRgRt_find_formatRp(tklassRRRt
format_string((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pytfind_formatscC@sEtj|d|d|d|tjj|d|d|d|dS(Ntallow_unsupportedtrecommend_upgradetbasedir(Rptcheck_support_statusRR(RRRR((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pyRs
N(RRRSRMRTRzR,RKRRR^RRRRtclassmethodRRR(((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pyRs		
	s"Bazaar-NG Knit Repository Format 1sbzrlib.repofmt.knitrepotRepositoryFormatKnit1s+Bazaar Knit Repository Format 3 (bzr 0.15)
tRepositoryFormatKnit3s*Bazaar Knit Repository Format 4 (bzr 1.0)
tRepositoryFormatKnit4s1Bazaar pack repository format 1 (needs bzr 0.92)
sbzrlib.repofmt.knitpack_repotRepositoryFormatKnitPack1sFBazaar pack repository format 1 with subtree support (needs bzr 0.92)
tRepositoryFormatKnitPack3s?Bazaar pack repository format 1 with rich root (needs bzr 1.0)
tRepositoryFormatKnitPack4s+Bazaar RepositoryFormatKnitPack5 (bzr 1.6)
tRepositoryFormatKnitPack5s5Bazaar RepositoryFormatKnitPack5RichRoot (bzr 1.6.1)
t!RepositoryFormatKnitPack5RichRoots3Bazaar RepositoryFormatKnitPack5RichRoot (bzr 1.6)
t'RepositoryFormatKnitPack5RichRootBrokens+Bazaar RepositoryFormatKnitPack6 (bzr 1.9)
tRepositoryFormatKnitPack6s3Bazaar RepositoryFormatKnitPack6RichRoot (bzr 1.9)
t!RepositoryFormatKnitPack6RichRoots6Bazaar repository format 2a (needs bzr 1.16 or later)
s!bzrlib.repofmt.groupcompress_repotRepositoryFormat2asQBazaar development format 2 with subtree support (needs bzr.dev from before 1.8)
t'RepositoryFormatPackDevelopment2SubtreesBazaar development format 8
tRepositoryFormat2aSubtreeRfcB@szeZdZgZeddZededZe	e
jeddddZ
edZedZRS(sThis class represents operations taking place between two repositories.

    Its instances have methods like copy_content and fetch, and contain
    references to the source and target repositories these operations can be
    carried out on.

    Often we will provide convenience methods on 'repository' which carry out
    operations with another repository - they will always forward to
    InterRepository.get(other).method_name(parameters).
    cC@sNy|jj|jjWntk
r0nX|jj|jd|dS(s Make a complete copy of the content in self into destination.

        This is a destructive operation! Do not use it on existing
        repositories.

        :param revision_id: Only copy the content needed to construct
                            revision_id and its parents.
        R7N(RR7RR9R9R(RR7((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pyRcs


cC@st|jdS(sFetch the content required to construct revision_id.

        The content is copied from self.source to self.target.

        :param revision_id: if None all content is copied, if NULL_REVISION no
                            content is copied.
        :return: None.
        N(R9R(RR7R((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pyRss
cC@st|jdS(sReturn the revision ids that source has that target does not.

        :param revision_id: only return revision ids included by this
            revision_id.
        :param revision_ids: return revision ids included by these
            revision_ids.  NoSuchRevision will be raised if any of these
            revisions are not present.
        :param if_present_ids: like revision_ids, but will not cause
            NoSuchRevision if any of these are absent, instead they will simply
            not be in the result.  This is useful for e.g. finding revisions
            to fetch for tags, which may reference absent revisions.
        :param find_ghosts: If True find missing revisions in deep history
            rather than just finding the surface difference.
        :param limit: Maximum number of revisions to return, topologically
            ordered
        :return: A bzrlib.graph.SearchResult.
        N(R9R(RR7RRRR((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pyRscC@s6ytj||tSWntjk
r1}tSXdS(sTrue if source and target have the same data representation.

        Note: this is always called on the base class; overriding it in a
        subclass will have no effect.
        N(RfRgRKRtIncompatibleRepositoriesRM(RRte((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pyt_same_models
cC@s^|j|jkr0tj||dn|j|jkrZtj||dndS(sJRaise an exception if two repositories do not use the same model.
        sdifferent rich-root supportsdifferent serializersN(RURRt_serializer(RR((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pyRgsN(RRRSt_optimisersRRRRMRRRR_RKRR]RRg(((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pyRfTs
	
t
CopyConvertercB@s eZdZdZdZRS(srA repository conversion tool which just performs a copy of the content.

    This is slow but quite reliable.
    cC@s
||_dS(snCreate a CopyConverter.

        :param target_format: The format the resulting repository should be.
        N(R}(RR}((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pyRscC@sltjj}d|_d|_|jj|j|_|j	t
d|jjjdd|jjj
d}|jj|j|jj|jdtd||_|j	t
d|jj|j|jj}|jz'|j	t
d	|jj|Wd
|jX|j	t
d|jjjdtjjt
d|jd
S(
sPerform the conversion of to_convert, giving feedback via pb.

        :param to_convert: The disk object to convert.
        :param pb: a progress bar to use for progress information.
        iis&Moving repository to repository.backupR&srepository.backupRt_override_transportsCreating new repositorysCopying contentNsDeleting old repository contentsrepository converted(Rt
ui_factorytnested_progress_bartcountttotalRvtget_format_stringRtrepo_dirR)RaRRtmoveRR~R}RRKtsource_repoRrRRRRYtdelete_treeRtfinished(RRtpbtbackup_transportt	converted((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pytconverts0		

(RRRSRR(((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pyRs	c@s]tjkrtj=nx:jD],\}}tfd|D|<q)WS(sDAlso don't use this. more compatibility code for unmigrated clients.c3@s!|]}|kr|VqdS(N((Rtparent(trevision_graph(s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pys	<genexpr>s(RRtitemsR&(RRAR%((Rs5/usr/lib/python2.7/dist-packages/bzrlib/repository.pyt_strip_NULL_ghostss

$cC@s|d}|j}|j|tjf}yj|jxYtr|dk	rft||krfPn|d|krzPn|j}|j|q>WWnt	k
rdSXdS(sExtend the partial history to include a given index

    If a stop_index is supplied, stop when that index has been reached.
    If a stop_revision is supplied, stop when that revision is
    encountered.  Otherwise, stop when the beginning of history is
    reached.

    :param stop_index: The index which should be present.  When it is
        present, history extension will stop.
    :param stop_revision: The revision id which should be present.  When
        it is encountered, history extension will stop.
    iN(
Rtiter_lefthand_ancestryRRtnextRKRR}Rt
StopIteration(Rtpartial_history_cacheRt
stop_revisiontstart_revisionRtiteratorR7((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pyRs 
	
	
R.cB@s)eZdZdZdZdZRS(sAn iterable yielding the contents of many lists as one list.

    Each iterator made from this will reflect the current contents of the lists
    at the time the iterator is made.
    
    This is used by Repository's _make_parents_provider implementation so that
    it is safe to do::

      pp = repo._make_parents_provider()      # uses a list of fallback repos
      pp.add_fallback_repository(other_repo)  # appends to that list
      result = pp.get_parent_map(...)
      # The result will include revs from other_repo
    cG@s
||_dS(N(t
list_parts(RR((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pyRscC@s1g}x|jD]}|j|qWt|S(N(RRtiter(Rt	full_listt	list_part((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pyt__iter__scC@sd|j|jj|jfS(Ns	%s.%s(%s)(RR{RR(R((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pyRZ%s(RRRSRRRZ(((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pyR.
s
		N(5t
__future__Rtbzrlib.lazy_importRtglobalstbzrlibRRRRRtbzrlib.decoratorsRRR	tbzrlib.interR
tbzrlib.lockRRtbzrlib.traceR
RRRRRMRNRRRRRWRstControlComponentR[RbtControlComponentFormatRegistryRntFormatRegistrytnetwork_format_registryRptControlComponentFormatRpRRt
register_lazyRfRRRRR.(((s5/usr/lib/python2.7/dist-packages/bzrlib/repository.pyt<module>s	((1	M\0	!

Copyright © 2017 || Recoded By Mr.Bumblebee