-=[ Mr. Bumblebee ]=-
_Indonesia_

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


KFOc@@sdZddlmZddlmZeedddlmZddlm	Z	m
Z
mZmZddl
mZddlmZmZmZmZmZmZmZmZmZdd	lmZd
eefdYZdefd
YZdefdYZdefdYZdefdYZdefdYZ defdYZ!defdYZ"defdYZ#defdYZ$defdYZ%d efd!YZ&d"e&fd#YZ'd$e&fd%YZ(d&efd'YZ)d(S()s#Knit-based pack repository formats.i(tabsolute_import(tlazy_importsJ
from itertools import izip
import time

from bzrlib import (
    controldir,
    debug,
    errors,
    knit,
    osutils,
    pack,
    revision as _mod_revision,
    trace,
    tsort,
    ui,
    xml5,
    xml6,
    xml7,
    )
from bzrlib.knit import (
    _KnitGraphIndex,
    KnitPlainFactory,
    KnitVersionedFiles,
    )
(tbtree_index(tCombinedGraphIndext
GraphIndextGraphIndexPrefixAdaptertInMemoryGraphIndex(tKnitRepository(	t_DirectPackAccesstNewPacktRepositoryFormatPacktResumedPacktPackertPackCommitBuildertPackRepositorytPackRootCommitBuildertRepositoryPackCollection(tStreamSourcetKnitPackRepositorycB@s#eZdZdZdZRS(c
C@s-tj|||||||jjr7tdn|jjd}t||j||jjd|jjd|j|j	dt
|_tt
|jjjd|jjjdtdtd	|jd
|jjjdd|_tt
|jjjd|jjjdt
dtd	|jd
td
|jjjdd|_tt
|jjjd|jjjdt
dt
d	|jd
|jjjdd|_tt
|jjjd|jjjdtdtd	|jd
|jjjdd|_d|_d|_d|_t|_t|_ t
|_!dS(Nschk not supportedtindicestuploadtpackst
use_chk_indextadd_callbacktdeltastparentst	is_lockedtdata_accesstmax_delta_chainittrack_external_parent_refsi("Rt__init__t_formatt
supports_chkstAssertionErrort
_transporttclonetKnitRepositoryPackCollectiontindex_builder_classtindex_classtFalset_pack_collectiontKnitVersionedFilest_KnitGraphIndextinventory_indextcombined_indexRtTrueRRtinventoriestrevision_indext	revisionstsignature_indext
signaturest
text_indexttextstNonet	chk_bytest_write_lock_countt_transactiont_reconcile_does_inventory_gct_reconcile_fixes_text_parentst_reconcile_backsup_inventory(tselfRta_bzrdirt
control_filest_commit_builder_classt_serializertindex_transport((s@/usr/lib/python2.7/dist-packages/bzrlib/repofmt/knitpack_repo.pyRNsX
							cC@s8|j|jjkr(t||Stj||S(N(tnetwork_nameRtKnitPackStreamSourceRt_get_source(R<t	to_format((s@/usr/lib/python2.7/dist-packages/bzrlib/repofmt/knitpack_repo.pyRDs
cC@s"t||||}|j|S(N(tKnitReconcilePackertpack(R<t
collectionRt	extensiontrevstpbtpacker((s@/usr/lib/python2.7/dist-packages/bzrlib/repofmt/knitpack_repo.pyt_reconcile_packs(t__name__t
__module__RRDRM(((s@/usr/lib/python2.7/dist-packages/bzrlib/repofmt/knitpack_repo.pyRLs	6	tRepositoryFormatKnitPack1cB@sneZdZeZeZedZe	Z
eZdZ
dZee
eZedZdZRS(sZA no-subtrees parameterized Pack repository.

    This format was introduced in 0.92.
    cC@stjS(N(txml5t
serializer_v5(R<((s@/usr/lib/python2.7/dist-packages/bzrlib/repofmt/knitpack_repo.pyR@scC@stjjdS(Ns	pack-0.92(t
controldirtformat_registrytmake_bzrdir(R<((s@/usr/lib/python2.7/dist-packages/bzrlib/repofmt/knitpack_repo.pyt_get_matching_bzrdirscC@sdS(N((R<tformat((s@/usr/lib/python2.7/dist-packages/bzrlib/repofmt/knitpack_repo.pyt_ignore_setting_bzrdirscC@sdS(s)See RepositoryFormat.get_format_string().s1Bazaar pack repository format 1 (needs bzr 0.92)
((tcls((s@/usr/lib/python2.7/dist-packages/bzrlib/repofmt/knitpack_repo.pytget_format_stringscC@sdS(s.See RepositoryFormat.get_format_description().s.Packs containing knits without subtree support((R<((s@/usr/lib/python2.7/dist-packages/bzrlib/repofmt/knitpack_repo.pytget_format_descriptions(RNROt__doc__Rtrepository_classR
R?tpropertyR@RR%RR&RVRXt_matchingbzrdirtclassmethodRZR[(((s@/usr/lib/python2.7/dist-packages/bzrlib/repofmt/knitpack_repo.pyRPs		tRepositoryFormatKnitPack3cB@seZdZeZeZeZeZ	eZ
edZe
ZeZdZdZeeeZedZdZRS(sA subtrees parameterized Pack repository.

    This repository format uses the xml7 serializer to get:
     - support for recording full info about the tree root
     - support for recording tree-references

    This format was introduced in 0.92.
    cC@stjS(N(txml7t
serializer_v7(R<((s@/usr/lib/python2.7/dist-packages/bzrlib/repofmt/knitpack_repo.pyR@scC@stjjdS(Nspack-0.92-subtree(RSRTRU(R<((s@/usr/lib/python2.7/dist-packages/bzrlib/repofmt/knitpack_repo.pyRVs	cC@sdS(N((R<RW((s@/usr/lib/python2.7/dist-packages/bzrlib/repofmt/knitpack_repo.pyRXscC@sdS(s)See RepositoryFormat.get_format_string().sFBazaar pack repository format 1 with subtree support (needs bzr 0.92)
((RY((s@/usr/lib/python2.7/dist-packages/bzrlib/repofmt/knitpack_repo.pyRZscC@sdS(s.See RepositoryFormat.get_format_description().s,Packs containing knits with subtree support
((R<((s@/usr/lib/python2.7/dist-packages/bzrlib/repofmt/knitpack_repo.pyR[s(RNROR\RR]RR?R-trich_root_datatexperimentaltsupports_tree_referenceR^R@RR%RR&RVRXR_R`RZR[(((s@/usr/lib/python2.7/dist-packages/bzrlib/repofmt/knitpack_repo.pyRas		tRepositoryFormatKnitPack4cB@szeZdZeZeZeZe	Z
edZe
ZeZdZdZeeeZedZdZRS(sA rich-root, no subtrees parameterized Pack repository.

    This repository format uses the xml6 serializer to get:
     - support for recording full info about the tree root

    This format was introduced in 1.0.
    cC@stjS(N(txml6t
serializer_v6(R<((s@/usr/lib/python2.7/dist-packages/bzrlib/repofmt/knitpack_repo.pyR@scC@stjjdS(Nsrich-root-pack(RSRTRU(R<((s@/usr/lib/python2.7/dist-packages/bzrlib/repofmt/knitpack_repo.pyRVs	cC@sdS(N((R<RW((s@/usr/lib/python2.7/dist-packages/bzrlib/repofmt/knitpack_repo.pyRXscC@sdS(s)See RepositoryFormat.get_format_string().s?Bazaar pack repository format 1 with rich root (needs bzr 1.0)
((RY((s@/usr/lib/python2.7/dist-packages/bzrlib/repofmt/knitpack_repo.pyRZscC@sdS(s.See RepositoryFormat.get_format_description().s.Packs containing knits with rich root support
((R<((s@/usr/lib/python2.7/dist-packages/bzrlib/repofmt/knitpack_repo.pyR[s(RNROR\RR]RR?R-RdR'RfR^R@RR%RR&RVRXR_R`RZR[(((s@/usr/lib/python2.7/dist-packages/bzrlib/repofmt/knitpack_repo.pyRgs		tRepositoryFormatKnitPack5cB@steZdZeZeZeZe	Z
eZe
dZdZdZe
eeZedZdZRS(sRepository that supports external references to allow stacking.

    New in release 1.6.

    Supports external lookups, which results in non-truncated ghosts after
    reconcile compared to pack-0.92 formats.
    cC@stjS(N(RQRR(R<((s@/usr/lib/python2.7/dist-packages/bzrlib/repofmt/knitpack_repo.pyR@scC@stjjdS(Ns1.6(RSRTRU(R<((s@/usr/lib/python2.7/dist-packages/bzrlib/repofmt/knitpack_repo.pyRVscC@sdS(N((R<RW((s@/usr/lib/python2.7/dist-packages/bzrlib/repofmt/knitpack_repo.pyRXscC@sdS(s)See RepositoryFormat.get_format_string().s+Bazaar RepositoryFormatKnitPack5 (bzr 1.6)
((RY((s@/usr/lib/python2.7/dist-packages/bzrlib/repofmt/knitpack_repo.pyRZscC@sdS(s.See RepositoryFormat.get_format_description().s1Packs 5 (adds stacking support, requires bzr 1.6)((R<((s@/usr/lib/python2.7/dist-packages/bzrlib/repofmt/knitpack_repo.pyR[!s(RNROR\RR]R
R?R-tsupports_external_lookupsRR%RR&R^R@RVRXR_R`RZR[(((s@/usr/lib/python2.7/dist-packages/bzrlib/repofmt/knitpack_repo.pyRjs		t!RepositoryFormatKnitPack5RichRootcB@seZdZeZeZeZe	Z
eZeZ
eZedZdZdZeeeZedZdZRS(sA repository with rich roots and stacking.

    New in release 1.6.1.

    Supports stacking on other repositories, allowing data to be accessed
    without being stored locally.
    cC@stjS(N(RhRi(R<((s@/usr/lib/python2.7/dist-packages/bzrlib/repofmt/knitpack_repo.pyR@8scC@stjjdS(Ns1.6.1-rich-root(RSRTRU(R<((s@/usr/lib/python2.7/dist-packages/bzrlib/repofmt/knitpack_repo.pyRV<s	cC@sdS(N((R<RW((s@/usr/lib/python2.7/dist-packages/bzrlib/repofmt/knitpack_repo.pyRX@scC@sdS(s)See RepositoryFormat.get_format_string().s5Bazaar RepositoryFormatKnitPack5RichRoot (bzr 1.6.1)
((RY((s@/usr/lib/python2.7/dist-packages/bzrlib/repofmt/knitpack_repo.pyRZEscC@sdS(Ns=Packs 5 rich-root (adds stacking support, requires bzr 1.6.1)((R<((s@/usr/lib/python2.7/dist-packages/bzrlib/repofmt/knitpack_repo.pyR[Js(RNROR\RR]RR?R-RdR'RfRkRR%RR&R^R@RVRXR_R`RZR[(((s@/usr/lib/python2.7/dist-packages/bzrlib/repofmt/knitpack_repo.pyRl&s		t'RepositoryFormatKnitPack5RichRootBrokencB@seZdZeZeZeZe	Z
eZeZ
eZedZdZdZeeeZedZdZdZRS(sA repository with rich roots and external references.

    New in release 1.6.

    Supports external lookups, which results in non-truncated ghosts after
    reconcile compared to pack-0.92 formats.

    This format was deprecated because the serializer it uses accidentally
    supported subtrees, when the format was not intended to. This meant that
    someone could accidentally fetch from an incorrect repository.
    cC@stjS(N(RbRc(R<((s@/usr/lib/python2.7/dist-packages/bzrlib/repofmt/knitpack_repo.pyR@escC@stjjd}||_|S(Ns1.6.1-rich-root(RSRTRUtrepository_format(R<tmatching((s@/usr/lib/python2.7/dist-packages/bzrlib/repofmt/knitpack_repo.pyRVis			cC@sdS(N((R<RW((s@/usr/lib/python2.7/dist-packages/bzrlib/repofmt/knitpack_repo.pyRXoscC@sdS(s)See RepositoryFormat.get_format_string().s3Bazaar RepositoryFormatKnitPack5RichRoot (bzr 1.6)
((RY((s@/usr/lib/python2.7/dist-packages/bzrlib/repofmt/knitpack_repo.pyRZtscC@sdS(NsHPacks 5 rich-root (adds stacking support, requires bzr 1.6) (deprecated)((R<((s@/usr/lib/python2.7/dist-packages/bzrlib/repofmt/knitpack_repo.pyR[yscC@stS(N(R-(R<((s@/usr/lib/python2.7/dist-packages/bzrlib/repofmt/knitpack_repo.pyt
is_deprecated}s(RNROR\RR]RR?R-RdR'RfRkRR%RR&R^R@RVRXR_R`RZR[Rp(((s@/usr/lib/python2.7/dist-packages/bzrlib/repofmt/knitpack_repo.pyRmNs			tRepositoryFormatKnitPack6cB@szeZdZeZeZeZe	j
Ze	jZ
edZdZdZeeeZedZdZRS(sA repository with stacking and btree indexes,
    without rich roots or subtrees.

    This is equivalent to pack-1.6 with B+Tree indices.
    cC@stjS(N(RQRR(R<((s@/usr/lib/python2.7/dist-packages/bzrlib/repofmt/knitpack_repo.pyR@scC@stjjdS(Ns1.9(RSRTRU(R<((s@/usr/lib/python2.7/dist-packages/bzrlib/repofmt/knitpack_repo.pyRVscC@sdS(N((R<RW((s@/usr/lib/python2.7/dist-packages/bzrlib/repofmt/knitpack_repo.pyRXscC@sdS(s)See RepositoryFormat.get_format_string().s+Bazaar RepositoryFormatKnitPack6 (bzr 1.9)
((RY((s@/usr/lib/python2.7/dist-packages/bzrlib/repofmt/knitpack_repo.pyRZscC@sdS(s.See RepositoryFormat.get_format_description().s.Packs 6 (uses btree indexes, requires bzr 1.9)((R<((s@/usr/lib/python2.7/dist-packages/bzrlib/repofmt/knitpack_repo.pyR[s(RNROR\RR]R
R?R-RkRtBTreeBuilderR%tBTreeGraphIndexR&R^R@RVRXR_R`RZR[(((s@/usr/lib/python2.7/dist-packages/bzrlib/repofmt/knitpack_repo.pyRqs				t!RepositoryFormatKnitPack6RichRootcB@seZdZeZeZeZe	Z
eZej
ZejZedZdZdZeeeZedZdZRS(ssA repository with rich roots, no subtrees, stacking and btree indexes.

    1.6-rich-root with B+Tree indices.
    cC@stjS(N(RhRi(R<((s@/usr/lib/python2.7/dist-packages/bzrlib/repofmt/knitpack_repo.pyR@scC@stjjdS(Ns
1.9-rich-root(RSRTRU(R<((s@/usr/lib/python2.7/dist-packages/bzrlib/repofmt/knitpack_repo.pyRVs	cC@sdS(N((R<RW((s@/usr/lib/python2.7/dist-packages/bzrlib/repofmt/knitpack_repo.pyRXscC@sdS(s)See RepositoryFormat.get_format_string().s3Bazaar RepositoryFormatKnitPack6RichRoot (bzr 1.9)
((RY((s@/usr/lib/python2.7/dist-packages/bzrlib/repofmt/knitpack_repo.pyRZscC@sdS(Ns8Packs 6 rich-root (uses btree indexes, requires bzr 1.9)((R<((s@/usr/lib/python2.7/dist-packages/bzrlib/repofmt/knitpack_repo.pyR[s(RNROR\RR]RR?R-RdR'RfRkRRrR%RsR&R^R@RVRXR_R`RZR[(((s@/usr/lib/python2.7/dist-packages/bzrlib/repofmt/knitpack_repo.pyRts				t'RepositoryFormatPackDevelopment2SubtreecB@seZdZeZeZeZeZ	eZ
eZej
ZejZedZdZdZeeeZedZdZRS(sA subtrees development repository.

    This format should be retained in 2.3, to provide an upgrade path from this
    to RepositoryFormat2aSubtree.  It can be removed in later releases.

    1.6.1-subtree[as it might have been] with B+Tree indices.
    cC@stjS(N(RbRc(R<((s@/usr/lib/python2.7/dist-packages/bzrlib/repofmt/knitpack_repo.pyR@scC@stjjdS(Nsdevelopment5-subtree(RSRTRU(R<((s@/usr/lib/python2.7/dist-packages/bzrlib/repofmt/knitpack_repo.pyRVs	cC@sdS(N((R<RW((s@/usr/lib/python2.7/dist-packages/bzrlib/repofmt/knitpack_repo.pyRXscC@sdS(s)See RepositoryFormat.get_format_string().sQBazaar development format 2 with subtree support (needs bzr.dev from before 1.8)
((RY((s@/usr/lib/python2.7/dist-packages/bzrlib/repofmt/knitpack_repo.pyRZscC@sdS(s.See RepositoryFormat.get_format_description().sXDevelopment repository format, currently the same as 1.6.1-subtree with B+Tree indices.
((R<((s@/usr/lib/python2.7/dist-packages/bzrlib/repofmt/knitpack_repo.pyR[s(RNROR\RR]RR?R-RdReRfRkRRrR%RsR&R^R@RVRXR_R`RZR[(((s@/usr/lib/python2.7/dist-packages/bzrlib/repofmt/knitpack_repo.pyRus				RCcB@s2eZdZdZdZdZdZRS(sSA StreamSource used to transfer data between same-format KnitPack repos.

    This source assumes:
        1) Same serialization format for all objects
        2) Same root information
        3) XML format inventories
        4) Atomic inserts (so we can stream inventory texts before text
           content)
        5) No chk_bytes
    cC@s/tt|j||d|_d|_dS(Nt	unordered(tsuperRCRR5t
_text_keyst_text_fetch_order(R<tfrom_repositoryRE((s@/usr/lib/python2.7/dist-packages/bzrlib/repofmt/knitpack_repo.pyRs	c@sjj|}g|D]}|f^q}jjtj|ttddtfdg|D]}|f^qfd}d|fS(Nc@s|jdkr(td|jfn|j}|jd}j||\}}|jdkrwj|}n!|jdkrj|}njg|D]}||f^qdS(Ns
knit-delta-gzs
knit-ft-gzs3Unknown content storage kind for inventory text: %si(s
knit-delta-gzs
knit-ft-gz(tstorage_kindt
ValueErrort_raw_recordtkeyt
_parse_recordtget_linedelta_contenttget_fulltext_contenttupdate(trecordtraw_datatrevision_idtcontentt_t
line_iteratortline(tcontent_text_keystfactorytfind_text_keystknit(s@/usr/lib/python2.7/dist-packages/bzrlib/repofmt/knitpack_repo.pytfind_text_keys_from_contents	
	c3@svj}|jdt}xD|D]<}|jdkrRtj|jn||Vq%W_dS(NRvtabsent(R.tget_record_streamR'R{terrorstNoSuchRevisionR~Rx(t	source_vftstreamR(RRt	from_repotparent_text_keyst
revision_keysR<(s@/usr/lib/python2.7/dist-packages/bzrlib/repofmt/knitpack_repo.pyt_filtered_inv_stream"s		

	R.(	Rzt_find_parent_ids_of_revisionsR@t_find_text_key_referencestsett_inventory_xml_lines_for_keysR)R5tKnitPlainFactory(R<trevision_idst
parent_idstptparent_keystrR((	RRRRRRRRR<s@/usr/lib/python2.7/dist-packages/bzrlib/repofmt/knitpack_repo.pyt_get_filtered_inv_streams			
cC@s+|jjj|j|jt}d|fS(NR4(RzR4RRxRyR'(R<ttext_stream((s@/usr/lib/python2.7/dist-packages/bzrlib/repofmt/knitpack_repo.pyt_get_text_stream.scc@sg|j}x|j|D]}|VqWg|D]}|f^q2|_|j|V|jVdS(N(tget_keyst_fetch_revision_textst_revision_keysRR(R<tsearchRtstream_infotrev_id((s@/usr/lib/python2.7/dist-packages/bzrlib/repofmt/knitpack_repo.pyt
get_stream5s	(RNROR\RRRR(((s@/usr/lib/python2.7/dist-packages/bzrlib/repofmt/knitpack_repo.pyRCs

		'	t
KnitPackercB@seZdZdddZdZddZddZddZe	dZ
dZdZd	Z
d
ZdZdZd
ZdZdZdZRS(s"Packer that works with knit packs.cC@s,tt|j|||d|d|dS(NRtreload_func(RwRR(R<tpack_collectionRtsuffixRR((s@/usr/lib/python2.7/dist-packages/bzrlib/repofmt/knitpack_repo.pyRAscC@sPg}i}x7|jD],}t||}|j||||<qW||fS(sQConvert a list of packs to an index pack map and index list.

        :param index_attribute: The attribute that the desired index is found
            on.
        :return: A tuple (map, list) where map contains the dict from
            index:pack_tuple, and list contains the indices in the preferred
            access order.
        (Rtgetattrtappend(R<tindex_attributeRtpack_maptpack_objtindex((s@/usr/lib/python2.7/dist-packages/bzrlib/repofmt/knitpack_repo.pyt_pack_map_and_index_listGs	
cC@s3t|}|dkr"|jS|j|SdS(sGet an iterable of the index contents from a pack_map.

        :param indices: The list of indices to query
        :param key_filter: An optional filter to limit the keys returned.
        N(RR5titer_all_entriestiter_entries(R<Rt
key_filtert	all_index((s@/usr/lib/python2.7/dist-packages/bzrlib/repofmt/knitpack_repo.pyt_index_contentsXs
cC@sDtjj}z#|j|||||d|SWd|jXdS(sCopy knit nodes between packs with no graph references.

        :param output_lines: Output full texts of copied items.
        toutput_linesN(tuit
ui_factorytnested_progress_bart_do_copy_nodestfinished(R<tnodest	index_maptwritertwrite_indexRRK((s@/usr/lib/python2.7/dist-packages/bzrlib/repofmt/knitpack_repo.pyt_copy_nodesds
c 	C@stdd}t|}i}xG|D]?\}	}
}|	|krPg||	<n||	j|
|fq(Wd}|jd|t|x|jD]\}	}
g}xh|
D]`\}
}|djd}t|dt|d}}|j|||
|dffqW|j	||	}|j
\}}y3tj||g|D]}|dd!^qP}Wn3t
jk
r|jdk	r|jnnXxt|j|D]\\}}\}}\}
}|d}|dk	r||j|
d|dn"|j|
|\}}|j|j||\}}|j|
|d||f|jd||d7}qWqWdS(Nis
Copied recordit iis%d %d(R)R5tsortedRRtlent	iteritemstsplittinttsorttaccess_tupleRGtmake_readv_readerRt
NoSuchFilet_reload_functiziptiter_recordsRt_parse_record_headertclosetadd_bytes_recordtadd_node( R<RRRRRKRRtrequest_groupsRR~tvaluetrecord_indextitemstpack_readv_requeststbitstoffsettlengthRt	transporttpathtreadertnamest	read_funct_1t_2teol_flagRtdfRtpostsize((s@/usr/lib/python2.7/dist-packages/bzrlib/repofmt/knitpack_repo.pyRqsH
!$

'
4!
c	c@sstjj}y5x.|j|||||||D]}|Vq4WWntk
rd|jnX|jdS(sCopy knit nodes between packs.

        :param output_lines: Return lines present in the copied data as
            an iterator of line,version_id.
        N(RRRt_do_copy_nodes_grapht	ExceptionR(	R<RRRtreadv_group_iterttotal_itemsRRKtresult((s@/usr/lib/python2.7/dist-packages/bzrlib/repofmt/knitpack_repo.pyt_copy_nodes_graphs


cc@stdd}|r!t}	nd}
|jd|
|x|D]\}}}
||}|j\}}ytj|||}Wn3tjk
r|j	dk	r|j	nnXx+t
|j|
D]\\}}\}}}|d}|rp|j|d|\}}t
|ddkrB|	j|}n|	j|}x>|D]}||fVqXWn"|j||\}}|j|j||\}}|j||d||f||jd|
|
d7}
qWqAWdS(Nis
Copied recordis%d %di(R)R5RRRRGRRRRRRRRRRRRRR(R<RRRRRKRRRRRRtreadv_vectortnode_vectorRRRRRRR~Rt
referencesRRRRRRRR((s@/usr/lib/python2.7/dist-packages/bzrlib/repofmt/knitpack_repo.pyRs<

.

!cC@sw|jj}|j||j}g}x@|jD]2\}}|jg|D]}||f^qMq4W||_dS(s;Use up the inv_lines generator and setup a text key filter.N(R(trepot'_find_file_ids_from_xml_inventory_linesRRtextendt_text_filter(R<t	inv_linesRtfileid_revisionsttext_filtertfileidtfile_revidst
file_revid((s@/usr/lib/python2.7/dist-packages/bzrlib/repofmt/knitpack_repo.pyt_process_inventory_liness*c	C@s#|j}|jd\}}|j||}|jjdd|j|\}}t|j}|j||j	j
|j	j||d|}|jr|j|nt
|d|_dtjkrtjdtj|jjj|j	j|j	jjtj|j	jndS(NR+sCopying inventory textsiRRGs;%s: create_pack: inventories copied: %s%s %d items t+%6.3fs(RRRRKRt_least_readv_node_readvtboolRRtnew_packt_writerR+RtlistR5Rtdebugtdebug_flagsttracetmutterttimetctimeR(t_upload_transporttbasetrandom_namet	key_countt
start_time(	R<tinv_keystinventory_index_maptinventory_indicest	inv_nodesRRRR((s@/usr/lib/python2.7/dist-packages/bzrlib/repofmt/knitpack_repo.pyt_copy_inventory_textss(			
			cC@sYg}t}xE|D]=}|d}||kr|j|||j|qqWt|t|jkrdtjkrtjdndSt|}x:|jD]/}||kr|j||j|qqWdtjkrLg|jD]}	|	j	d^q}
g|D]}	|	j	d^q}tjd|
|n||_dS(sDetermine how we want our packs to be ordered.

        This changes the sort order of the self.packs list so that packs unused
        by 'entries' will be at the end of the list, so that future requests
        can avoid probing them.  Used packs will be at the front of the
        self.packs list, in the order of their first use in 'entries'.

        :param entries: A list of (index, ...) tuples
        :param index_to_pack_map: A mapping from index objects to pack objects.
        iRGs'Not changing pack list, all packs used.Nis"Reordering packs
from: %s
  to: %s(
RRtaddRRRRRRR(R<tentriestindex_to_pack_mapRtseen_indexestentryRt
seen_packsRGRt	old_namest	new_names((s@/usr/lib/python2.7/dist-packages/bzrlib/repofmt/knitpack_repo.pyt_update_pack_order	s,	


&#	
cC@s3|jr+g|jD]}|f^q}nd}|jd\}}|j||}t|}|j|||jjdd|j|\}}t|j	||j
j|j
j||dt
jkr&tjdtj|jjj|j
j|j
jjtj|j
jn||_dS(NR/sCopying revision textsiRGs9%s: create_pack: revisions copied: %s%s %d items t+%6.3fs(RR5RRRRRKRt_revision_node_readvRRRR/RRRRR	R
R(RRR
RRR(R<RRtrevision_index_maptrevision_indicestrevision_nodesRR((s@/usr/lib/python2.7/dist-packages/bzrlib/repofmt/knitpack_repo.pyt_copy_revision_texts+s&	"		cC@s.|jd\}}||j||jfS(NR3(RRR(R<ttext_index_mapttext_indices((s@/usr/lib/python2.7/dist-packages/bzrlib/repofmt/knitpack_repo.pyt_get_text_nodesDscC@s|j\}}|jdk	rt|}td|D}t|j|}|rtjd||j}tj|d|dqn|j	j
dd|j|\}}t|j
||jj|jj|||jdS(Ncs@s|]}|dVqdS(iN((t.0t_node((s@/usr/lib/python2.7/dist-packages/bzrlib/repofmt/knitpack_repo.pys	<genexpr>Ussmissing keys during fetch: %riisCopying content textsi(R%RR5RRRtpopRtRevisionNotPresentRKRRRRRRR3t_log_copied_texts(R<R#t
text_nodestpresent_text_keystmissing_text_keyst
a_missing_keyRR((s@/usr/lib/python2.7/dist-packages/bzrlib/repofmt/knitpack_repo.pyt_copy_text_textsJs
c	C@s|jjddd|j|_|j}|jddtjkrg|jD]}d|jj	|j
f^qT}|jdk	rt
|j}nd}tjdtj|jjj	|j||n|j|j|j|j}|jd	\}}|j||}|jjd
d|j|||j|jdtjkrtjdtj|jjj	|j|jjtj|jn|j |j!|s|j"dS|jjd
d|j#|jj$||S(NsOpening packiiiRGs%s%stallsQ%s: create_pack: creating pack from source packs: %s%s %s revisions wanted %s t=0R1sCopying signature textsisC%s: create_pack: revision signatures copied: %s%s %d items t+%6.3fssFinishing packi(%RKRt	open_packRtset_write_cache_sizeRRRtpack_transportRtnameRR5RRRR	R
R(RR
R"RR/RRRRRR1RRt_check_referencest	_use_packtaborttfinishtallocate(	R<Rta_packtplain_pack_listt	rev_counttsignature_filtertsignature_index_maptsignature_indicestsignature_nodes((s@/usr/lib/python2.7/dist-packages/bzrlib/repofmt/knitpack_repo.pyt_create_pack_from_packsesJ	
,	



			
	


cC@sst|}t|}i}xM|D]E\}}}}||krPg||<n||j|||fq%Wg}x|jD]\}}	g}
xq|	D]i\}}}|djd}t|dt|d}}
|
j||
f||d|ffqW|
jg|
D]\}}|^q}g|
D]\}}|^q7}|j|||fqW||fS(s@Generate request groups for nodes using the least readv's.

        :param nodes: An iterable of graph index nodes.
        :return: Total node count and an iterator of the data needed to perform
            readvs to obtain the data for nodes. Each item yielded by the
            iterator is a tuple with:
            index, readv_vector, node_vector. readv_vector is a list ready to
            hand to the transport readv method, and node_vector is a list of
            (key, eol_flag, references) for the node retrieved by the
            matching readv_vector.
        iRi(RRRRRRR(R<RttotalRRR~RRRRRRRRtreadvtnodet
pack_readvR((s@/usr/lib/python2.7/dist-packages/bzrlib/repofmt/knitpack_repo.pyRs(

!$
cC@s
|j|S(sReturn the total revisions and the readv's to issue.

        :param revision_nodes: The revision index contents for the packs being
            incorporated into the new pack.
        :return: As per _least_readv_node_readv.
        (R(R<R!((s@/usr/lib/python2.7/dist-packages/bzrlib/repofmt/knitpack_repo.pyRsN(RNROR\R5RRRRRR'RRRRRR"R%R/RARR(((s@/usr/lib/python2.7/dist-packages/bzrlib/repofmt/knitpack_repo.pyR>s$	

3	(	
	 	"				-	%RFcB@s2eZdZdZdZdZdZRS(sA packer which regenerates indices etc as it copies.

    This is used by ``bzr reconcile`` to cause parent text pointers to be
    regenerated.
    cO@s&tt|j||t|_dS(N(RwRFRR't
_data_changed(R<targstkwargs((s@/usr/lib/python2.7/dist-packages/bzrlib/repofmt/knitpack_repo.pyRscC@s4|jj}|jj|}||_d|_dS(s>Generate a text key reference map rather for reconciling with.N(R(RR@Rt
_text_refsR5R(R<RRtrefs((s@/usr/lib/python2.7/dist-packages/bzrlib/repofmt/knitpack_repo.pyRs	c@s0|jjdd|jj}tg|jjjD]6\}}}}|dtd|dDf^q5}|j	|j
|}g}g}	g}
tj}|j
\}}
x|
D]}yt||d}Wn'tk
r|
j|t|_qX||fkrd}n||ddkrA|j|q|dd!|dddd!krt|_|j|d|d|d||ddfft|_q|	j|d|ft|_qW~~
|j|\}}t|j||jj|jj||tj|}tt|tt||	jdfd|j}t|jjddd
|jjj}t i|jj!|jj6}|j"|jj|jj|jj!t#t$|jjd|jjjdtd
td|j%d|dd}x|	D]\}}|jj&g}xO|D]G}|d|dkrt'j(d||fn|j|dqPWt)j*|j+j,|gdtj-j.d}|j/|||dtdt0q*W|jjj1}|r"t'j2d|fn|j3dS(s1generate what texts we should have and then copy.sCopying content textsiics@s|]}|dVqdS(iN((R&tref((s@/usr/lib/python2.7/dist-packages/bzrlib/repofmt/knitpack_repo.pys	<genexpr>siiR~c@sj|dddS(Nii(tget(R~(t	rev_order(s@/usr/lib/python2.7/dist-packages/bzrlib/repofmt/knitpack_repo.pyt<lambda>stblanktadd_nodes_callbackRRRRRRisMismatched key parent %r:%rRvtfulltextt	random_idt
check_contents+Reference to missing compression parents %rN((RO(4RKRR(RtdictRR/Rttuplet_generate_text_key_indexRIt
_mod_revisiont
NULL_REVISIONR%tKeyErrorRR-RFRRRRR3ttsortt	topo_sorttziptrangeRRtget_transactionRt	add_nodesRRt
set_writerR)R*RtflushRtBzrErrortosutilstsplit_linesR4Rtnexttget_bytes_ast	add_linesR't_external_referencest
BzrCheckErrorR*(R<RRR~RRJt	ancestorstideal_indextok_nodest	bad_textstdiscarded_nodesRXR#R+RDt
ideal_parentsRRt
topo_orderttransactiont
file_id_indexRtoutput_textsRRt
parent_keyt
text_linesR-((RMs@/usr/lib/python2.7/dist-packages/bzrlib/repofmt/knitpack_repo.pyR/sO	



	"	
!		

	$	cC@st}|jjj}x%|jD]}|j|dq%Wt}x(|jjD]}|j|dqYW||krt|_n|jo|jS(sAOverride _use_pack to check for reconcile having changed content.i(	RR(R+R,RRR-RFt
data_inserted(R<Rtoriginal_inventory_keyst	inv_indexRtnew_inventory_keys((s@/usr/lib/python2.7/dist-packages/bzrlib/repofmt/knitpack_repo.pyR6@s		(RNROR\RRR/R6(((s@/usr/lib/python2.7/dist-packages/bzrlib/repofmt/knitpack_repo.pyRFs
		
	gtOptimisingKnitPackercB@s eZdZdZdZRS(s>A packer which spends more time to create better disk layouts.cC@si}i}x;|D]3\}}}}|d||<|||f||<qWtj|}t|}	g}
xt|D]|}||\}}}|djd}t|dt|d}}
|
j|||
fg||d|fgfqxW|	|
fS(sRReturn the total revisions and the readv's to issue.

        This sort places revisions in topological order with the ancestors
        after the children.

        :param revision_nodes: The revision index contents for the packs being
            incorporated into the new pack.
        :return: As per _least_readv_node_readv.
        iiR(RZR[RtreversedRRR(R<R!Rjtby_keyRR~RRtorderRBtrequestsRRR((s@/usr/lib/python2.7/dist-packages/bzrlib/repofmt/knitpack_repo.pyRRs!-cC@sett|j}|jjdt|jjdt|jjdt|jjdt|S(s)Open a pack for the pack we are creating.tfor_size(	RwRzR1R/tset_optimizeR-R+R3R1(R<R((s@/usr/lib/python2.7/dist-packages/bzrlib/repofmt/knitpack_repo.pyR1ps(RNROR\RR1(((s@/usr/lib/python2.7/dist-packages/bzrlib/repofmt/knitpack_repo.pyRzOs	R$cB@s&eZdZeZeZeZe	Z
RS(sA knit pack collection.(RNROR\R	tpack_factoryRtresumed_pack_factoryRtnormal_packer_classRztoptimising_packer_class(((s@/usr/lib/python2.7/dist-packages/bzrlib/repofmt/knitpack_repo.pyR${s
N(*R\t
__future__Rtbzrlib.lazy_importRtglobalstbzrlibRtbzrlib.indexRRRRtbzrlib.repofmt.knitrepoRtbzrlib.repofmt.pack_repoRR	R
RRR
RRRtbzrlib.vf_repositoryRRRPRaRgRjRlRmRqRtRuRCRRFRzR$(((s@/usr/lib/python2.7/dist-packages/bzrlib/repofmt/knitpack_repo.pyt<module>s2	"@B!)(&(3$%,H,

Copyright © 2017 || Recoded By Mr.Bumblebee