-=[ Mr. Bumblebee ]=-
_Indonesia_

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


Rc@@sdZddlmZddlZddlmZddlmZmZddl	Z	ddl
Z
ddlmZddl
mZeeddd	lmZmZdd
lmZmZmZmZmZdZdedddddedd
	Zidd6dd6ed6ed6ed6ZdddddddeddeedeedZdZ dZ!de"fdYZ#de"fdYZ$de%fdYZ&de#fdYZ'eedZ(dZ)ed Z*d!Z+d"Z,d#Z-ed$Z.eed%Z/d&Z0ddd'Z1d(Z2d)Z3d*Z4d+Z5ddd,Z6d-Z7d.Z8d/Z9d0Z:d1Z;d2Z<ed3Z=dd4Z>d5e"fd6YZ?d7e"fd8YZ@d9d:ZAd;e@fd<YZBd=e@fd>YZCd?e@fd@YZDdAe@fdBYZEdCZFdDejGfdEYZHeHZIeIjJdFeCdGeIjJdHeBdIeIjJdJeDdKeIjJdLeEdMdNZKdOZLdPZMdQZNdRZOejGZPePjJdSeMdTePjJdUeNdVePjJdWeOdXddHdYZQdZZRd[ZSd\ZTd]ZUd^ZVejGZWd_ZXeWjJd`eXe:e9e2e6gZYdS(asCode to show logs of changes.

Various flavors of log can be produced:

* for one file, or the whole tree, and (not done yet) for
  files in a given directory

* in "verbose" mode with a description of what changed from one
  version to the next

* with file-ids and revision-ids shown

Logs are actually written out through an abstract LogFormatter
interface, which allows for different preferred formats.  Plugins can
register formats too.

Logs can be produced in either forward (oldest->newest) or reverse
(newest->oldest) order.

Logs can be filtered to show only revisions matching a particular
search string, or within a particular range of revisions.  The range
can be given as date/times, which are reduced to revisions before
calling in here.

In verbose mode we show a summary of what changed in each particular
revision.  Note that this is the delta for changes in that revision
relative to its left-most parent, not the delta relative to the last
logged revision.  So for example if you ask for a verbose log of
changes touching hello.c you will get a list of those revisions also
listing other things that were changed in the same revision, but not
all the changes since the previous revision that touched hello.c.
i(tabsolute_importN(tStringIO(tchaintizip(twarn(tlazy_imports

from bzrlib import (
    config,
    controldir,
    diff,
    errors,
    foreign,
    repository as _mod_repository,
    revision as _mod_revision,
    revisionspec,
    tsort,
    )
from bzrlib.i18n import gettext, ngettext
(t
lazy_regextregistry(tformat_datet,format_date_with_offset_in_original_timezonetget_diff_header_encodingtget_terminal_encodingtterminal_widthcc@srd}d}d}|jj}t|j|jtjg}x&t|D]}|jj	|}|j
|r||}	|j|}
n
d}	}
|	r|rn|	r|r||d|
fVn|	r|r||d|fVn`|
|kr||d||
ffVn9|	j|jks?|	j
|j
krT||d|
fVn|	}|
}|d7}qRWdS(s`Yield a description of revisions which affect the file_id.

    Each returned element is (revno, revision_id, description)

    This is the list of revisions where the file is either added,
    modified, renamed or deleted.

    TODO: Perhaps some way to limit this to only particular revisions,
    or to traverse a non-mainline set of revisions?
    isadded sdeleted srenamed %s => %ss	modified N(tNonet
repositoryt	get_graphtlisttiter_lefthand_ancestryt
last_revisiont
_mod_revisiont
NULL_REVISIONtreversedt
get_inventorythas_idtid2patht	text_sizet	text_sha1(tbranchtfile_idtlast_iet	last_pathtrevnotgraphthistorytrevision_idtthis_invtthis_iet	this_path((s./usr/lib/python2.7/dist-packages/bzrlib/log.pytfind_touching_revisions^s4



treversecC@s|dk	r|g}nd}|r<|r3d}qBd}nd}|	r`|rWd}
qfd}
nd}
td|d|d|d|d|d|d	|d
|
}t||j|dS(sWrite out human-readable log of commits to this branch.

    This function is being retained for backwards compatibility but
    should not be extended with new parameters. Use the new Logger class
    instead, eg. Logger(branch, rqst).show(lf), adding parameters to the
    make_log_request_dict function.

    :param lf: The LogFormatter object showing the output.

    :param specific_fileid: If not None, list only the commits affecting the
        specified file, rather than all commits.

    :param verbose: If True show added/changed/deleted/renamed files.

    :param direction: 'reverse' (default) is latest to earliest; 'forward' is
        earliest to latest.

    :param start_revision: If not None, only show revisions >= start_revision

    :param end_revision: If not None, only show revisions <= end_revision

    :param search: If not None, only show revisions with matching commit
        messages

    :param limit: If set, shows only 'limit' revisions, all revisions are shown
        if None or 0.

    :param show_diff: If True, output a diff after each revision.

    :param match: Dictionary of search lists to use when matching revision
      properties.
    tpartialtfullt	directiontspecific_fileidststart_revisiontend_revisiontlimittmessage_searcht
delta_typet	diff_typeN(R
tmake_log_request_dicttLoggertshow(Rtlftspecific_fileidtverboseR*R,R-tsearchR.t	show_difftmatchtfile_idsR0R1trqst((s./usr/lib/python2.7/dist-packages/bzrlib/log.pytshow_logs$,				R*tlevelst
generate_tagstexclude_common_ancestryt_match_using_deltascC@s|rO|r<d|kr,|dj|qL|g|d<qOi|gd6}ni|d6|d6|d6|d6|d6|d6|d6|d	6|	d
6|d6|
d6|d
6|d6|
d6S(sConvenience function for making a logging request dictionary.

    Using this function may make code slightly safer by ensuring
    parameters have the correct names. It also provides a reference
    point for documenting the supported parameters.

    :param direction: 'reverse' (default) is latest to earliest;
      'forward' is earliest to latest.

    :param specific_fileids: If not None, only include revisions
      affecting the specified files, rather than all revisions.

    :param start_revision: If not None, only generate
      revisions >= start_revision

    :param end_revision: If not None, only generate
      revisions <= end_revision

    :param limit: If set, generate only 'limit' revisions, all revisions
      are shown if None or 0.

    :param message_search: If not None, only include revisions with
      matching commit messages

    :param levels: the number of levels of revisions to
      generate; 1 for just the mainline; 0 for all levels, or None for
      a sensible default.

    :param generate_tags: If True, include tags for matched revisions.
`
    :param delta_type: Either 'full', 'partial' or None.
      'full' means generate the complete delta - adds/deletes/modifies/etc;
      'partial' means filter the delta using specific_fileids;
      None means do not generate any delta.

    :param diff_type: Either 'full', 'partial' or None.
      'full' means generate the complete diff - adds/deletes/modifies/etc;
      'partial' means filter the diff using specific_fileids;
      None means do not generate any diff.

    :param _match_using_deltas: a private parameter controlling the
      algorithm used for matching specific_fileids. This parameter
      may be removed in the future so bzrlib client code should NOT
      use it.

    :param exclude_common_ancestry: Whether -rX..Y should be interpreted as a
      range operator or as a graph difference.

    :param signature: show digital signature information

    :param match: Dictionary of list of search strings to use when filtering
      revisions. Keys can be 'message', 'author', 'committer', 'bugs' or
      the empty string to match any of the preceding properties.

    :param omit_merges: If True, commits with more than one parent are
      omitted.

    tmessageR*R+R,R-R.R>R?R0R1R@t	signatureR:tomit_mergesRA(tappend(R*R+R,R-R.R/R>R?R0R1RAR@R:RCRD((s./usr/lib/python2.7/dist-packages/bzrlib/log.pyR2s*CcC@s&tj}|r"|j|n|S(s-Apply default values to a request dictionary.(t_DEFAULT_REQUEST_PARAMStcopytupdate(R<tresult((s./usr/lib/python2.7/dist-packages/bzrlib/log.pyt_apply_log_request_defaults=scC@sddlm}|jd}|j||}|d|jkrUdj|dS|d|jkrydj|dS|d|jkrdS|d|j	krdSdS(	sget the signature validity

    :param rev_id: revision id to validate
    :param repo: repository of revision
    :return: human readable string to print to log
    i(tgpguvalid signature from {0}isunknown key {0}sinvalid signature!sno signatureN(
tbzrlibRKtGPGStrategyR
tverify_revision_signaturetSIGNATURE_VALIDtformattSIGNATURE_KEY_MISSINGtSIGNATURE_NOT_VALIDtSIGNATURE_NOT_SIGNED(trev_idtrepoRKtgpg_strategyRI((s./usr/lib/python2.7/dist-packages/bzrlib/log.pytformat_signature_validityEstLogGeneratorcB@seZdZdZRS(sA generator of log revisions.cC@st|jdS(sfIterate over LogRevision objects.

        :return: An iterator yielding LogRevision objects.
        N(tNotImplementedErrortiter_log_revisions(tself((s./usr/lib/python2.7/dist-packages/bzrlib/log.pyRZ]s(t__name__t
__module__t__doc__RZ(((s./usr/lib/python2.7/dist-packages/bzrlib/log.pyRXZsR3cB@s2eZdZdZdZdZdZRS(s5An object that generates, formats and displays a log.cC@s||_t||_dS(sCreate a Logger.

        :param branch: the branch to log
        :param rqst: A dictionary specifying the query parameters.
          See make_log_request_dict() for supported values.
        N(RRJR<(R[RR<((s./usr/lib/python2.7/dist-packages/bzrlib/log.pyt__init__hs	cC@st|ts td|n|jjzOt|ddrO|jn|j|t|ddr{|j	nWd|jj
XdS(s\Display the log.

        :param lf: The LogFormatter object to send the output to.
        snot a LogFormatter instance: %rt	begin_logtend_logN(t
isinstancetLogFormatterRRt	lock_readtgetattrR
R`t
_show_bodyRatunlock(R[R5((s./usr/lib/python2.7/dist-packages/bzrlib/log.pyR4rs


cC@s|j}|dd
ks/|j|dkrB|j|d<nt|dtsat|d<nt|dtsd
|d<nt|dtsd
|d<nt|dtst|d	<n|j|j|}x!|jD]}|j|qW|j	d
S(sQShow the main log output.

        Subclasses may wish to override this.
        R>t
supports_tagsR?tsupports_deltaR0t
supports_diffR1tsupports_signaturesRCN(
R<R
t
get_levelsRetFalset_generator_factoryRRZtlog_revisiontshow_advice(R[R5R<t	generatortlr((s./usr/lib/python2.7/dist-packages/bzrlib/log.pyRfs	&



cC@s
t||S(s\Make the LogGenerator object to use.

        Subclasses may wish to override this.
        (t_DefaultLogGenerator(R[RR<((s./usr/lib/python2.7/dist-packages/bzrlib/log.pyRns(R\R]R^R_R4RfRn(((s./usr/lib/python2.7/dist-packages/bzrlib/log.pyR3es
	
		t_StartNotLinearAncestorcB@seZdZRS(sDRaised when a start revision is not found walking left-hand history.(R\R]R^(((s./usr/lib/python2.7/dist-packages/bzrlib/log.pyRtsRscB@sDeZdZdZdZdZdZdZdZRS(s'The default generator of log revisions.cC@sO||_||_|jdrB|jrB|jj|_n	i|_dS(NR?(RR<tgetRhttagstget_reverse_tag_dicttrev_tag_dict(R[RR<((s./usr/lib/python2.7/dist-packages/bzrlib/log.pyR_s
		c
c@sw|j}|jd}|jd}|jd}|jd}|jd}d}|j}x
|D]}	x|	D]\\}
}}}
}|dkr||krqzn|rt|
jdkrqzn|dkrd}n|j|
|
|}|rt|
|jj	}nd}t
|
||||jj|
||V|rz|d7}||krkdSqzqzWqmWdS(	sfIterate over LogRevision objects.

        :return: An iterator yielding LogRevision objects.
        R>R.R1RCRDiiN(R<Rut_create_log_revision_iteratortlent
parent_idsR
t_format_diffRWRRtLogRevisionRx(R[R<R>R.R1tshow_signatureRDt	log_counttrevision_iteratortrevsRTRtmerge_depthtrevtdeltatdiffRC((s./usr/lib/python2.7/dist-packages/bzrlib/log.pyRZs6	
	
c
C@s|jj}t|jdkr-tj}n
|jd}|j|}|j|}|jjd}|dkr|dk	rg|D]}	|j
|	^q}
nd}
t}t}t
j||||
ddddd||jS(NiR+R(t	old_labeltt	new_labelt
path_encoding(RRRzR{RRt
revision_treeR<RuR
RRR
Rtshow_diff_treestgetvalue(
R[RRTR1RUtancestor_idttree_1ttree_2R;tidtspecific_filestsR((s./usr/lib/python2.7/dist-packages/bzrlib/log.pyR|s
%		
cC@st|j|jjd|jjd\|_|_|jjdrU|jSt|jjd}|dkrtd|n|j	SdS(sCreate a revision iterator for log.

        :return: An iterator over lists of ((rev_id, revno, merge_depth), rev,
            delta).
        R,R-RAR+isAillegal LogRequest: must match-using-deltas when logging %d filesN(
t_get_revision_limitsRR<Rutstart_rev_idt
end_rev_idt+_log_revision_iterator_using_delta_matchingRztBzrErrort+_log_revision_iterator_using_per_file_graph(R[t
file_count((s./usr/lib/python2.7/dist-packages/bzrlib/log.pyRys!

cC@s|j}|jddk}|jdoL|jdpL|jpL|j}t|j|j|j|jdd|d|d|jd}t|j||jd	|jd
d|jdd|jdS(NR>iR+R.R*tgenerate_merge_revisionstdelayed_graph_generationR@R0R:R;(R<RuRRt_calc_view_revisionsRtmake_log_rev_iterator(R[R<RRtview_revisions((s./usr/lib/python2.7/dist-packages/bzrlib/log.pyRs	!c
C@s|j}t|j|j|j|jddtd|jd}t|tsct|}nt	|j|jdd|d|jddk}t
|j||jd	|jd
S(NR*RR@R+itinclude_mergesR>iR0R:(R<RRRRRutTrueRbRt"_filter_revisions_touching_file_idR(R[R<R((s./usr/lib/python2.7/dist-packages/bzrlib/log.pyRs		(	R\R]R^R_RZR|RyRR(((s./usr/lib/python2.7/dist-packages/bzrlib/log.pyRss		$			c
C@s|r*||kr*tjtdn|dkrOttd|n|j\}}|dkrqgS|r||kr|st||rt||||S|s9yot|||d|}	|dks|rt|||rt	|	}	n|dkrt
|	}	n|	SWq9tk
r5q9Xnt||||||}	|dkr{t
tt	|	}	n|	S(sCalculate the revisions to view.

    :return: An iterator of (revision_id, dotted_revno, merge_depth) tuples OR
             a list of the same tuples.
    s:--exclude-common-ancestry requires two different revisionsR'tforwardsinvalid direction %riR@(sreverseR(terrorstBzrCommandErrortgettextt
ValueErrortlast_revision_infot_has_mergest_generate_one_revisiont_linear_view_revisionst_is_obvious_ancestorRRRtt_generate_all_revisionst_rebase_merge_depthtreverse_by_depth(
RRRR*RRR@tbr_revnot	br_rev_idt	iter_revs((s./usr/lib/python2.7/dist-packages/bzrlib/log.pyR'sB
			
	cC@s?||kr||dfgSt||}||dfgSdS(Ni(t_compute_revno_str(RRTRRt	revno_str((s./usr/lib/python2.7/dist-packages/bzrlib/log.pyR[sc
C@s	g}|ryxt||||D]x\}}}	t||r|jj}
|dk	r}|
j||r}tn|}Pq%|j|||	fq%W|SWqtk
rtj	t
dqXntt|t
|||d|dkd|}|S(Ns4Start revision not found in history of end revision.trebase_initial_depthsR'R@(RRRRR
tis_ancestorRtRERRRRtitert_graph_view_revisions(RRRR*RR@tinitial_revisionsRTRtdepthR R((s./usr/lib/python2.7/dist-packages/bzrlib/log.pyRds*


cC@s1|jj|gj|g}t|dkS(s-Does a revision have multiple parents or not?i(Rtget_parent_mapRuRz(RRTtparents((s./usr/lib/python2.7/dist-packages/bzrlib/log.pyRs!cC@sFy|j|}Wntjk
r*dSXdjd|DSdS(sCompute the revno string from a rev_id.

    :return: The revno string, or None if the revision is not in the supplied
        branch.
    t.cs@s|]}t|VqdS(N(tstr(t.0tn((s./usr/lib/python2.7/dist-packages/bzrlib/log.pys	<genexpr>sN(trevision_id_to_dotted_revnoRtNoSuchRevisionR
tjoin(RRTR((s./usr/lib/python2.7/dist-packages/bzrlib/log.pyRs
cC@s|r|ry"|j|}|j|}Wntjk
rEtSXt|dkr|t|dkr||d|dkSt|dkrt|dkr|dd!|dd!kr|d|dkStSntS(s2Is start_rev_id an obvious ancestor of end_rev_id?iiii(RRRRmRzR(RRRtstart_dottedt
end_dotted((s./usr/lib/python2.7/dist-packages/bzrlib/log.pyRs$$cc@s4|j\}}|j}|j}|dkr|dkr|}x|j|tjfD]$}	|	t|dfV|d8}q^Wn|dkr|}n|dk}
x|j|tjfD]W}	t||	}|
r|	|kr|s|	|dfVnt	}
Pq|	|dfVqW|
s0t
ndS(sCalculate a sequence of revisions to view, newest to oldest.

    :param start_rev_id: the lower revision-id
    :param end_rev_id: the upper revision-id
    :param exclude_common_ancestry: Whether the start_rev_id should be part of
        the iterated revisions.
    :return: An iterator of (revision_id, dotted_revno, merge_depth) tuples.
    :raises _StartNotLinearAncestor: if a start_rev_id is specified but
        is not found walking the left-hand history
    iiN(RRRR
RRRRRRRt(RRRR@RRRUR t	cur_revnoR"tfound_startR((s./usr/lib/python2.7/dist-packages/bzrlib/log.pyRs.		cc@s|rd}nd}|jd|d|d|}|syx|D]2\}}}	}
|djtt|	|fVq@Wnd}xw|D]o\}}}	}
|dkr|}n|r||kr|}n||8}n|djtt|	|fVqWdS(spCalculate revisions to view including merges, newest to oldest.

    :param branch: the branch
    :param start_rev_id: the lower revision-id
    :param end_rev_id: the upper revision-id
    :param rebase_initial_depth: should depths be rebased until a mainline
      revision is found?
    :return: An iterator of (revision_id, dotted_revno, merge_depth) tuples.
    s#with-merges-without-common-ancestryswith-mergeststart_revision_idtstop_revision_idt	stop_ruleRN(titer_merge_sorted_revisionsRtmapRR
(RRRRR@RRRTRRtend_of_mergetdepth_adjustment((s./usr/lib/python2.7/dist-packages/bzrlib/log.pyRs(			'		
cC@s|r|ddr|ddrtg|D]\}}}|^q,}|dkrg|D]"\}}}||||f^q]}qn|S(s,Adjust depths upwards so the top level is 0.iii(tmin(RtrRtdt	min_depth((s./usr/lib/python2.7/dist-packages/bzrlib/log.pyR s
"(5c
@sttkrCdgt}tt||g}n!fd}t|g}xMtD]E}	|	tkr|	||||||}qk|	||||}qkW|S(sICreate a revision iterator for log.

    :param branch: The branch being logged.
    :param view_revisions: The revisions being viewed.
    :param generate_delta: Whether to generate a delta for each revision.
      Permitted values are None, 'full' and 'partial'.
    :param search: A user text search string.
    :param file_ids: If non empty, only revisions matching one or more of
      the file-ids are to be kept.
    :param direction: the direction in which view_revisions is sorted
    :return: An iterator over lists of ((rev_id, revno, merge_depth), rev,
        delta).
    c3@s#xD]}|ddfVqWdS(N(R
(tview(R(s./usr/lib/python2.7/dist-packages/bzrlib/log.pyt_convertAs
N(ttypeRR
RzRtziptlog_adapterst_make_delta_filter(
RRtgenerate_deltaR8R;R*tnonestlog_rev_iteratorRtadapter((Rs./usr/lib/python2.7/dist-packages/bzrlib/log.pyR*s
		cC@sj|dkr|Sg|jD]:\}}|g|D]}tj|tj^q3f^q}t||S(sCreate a filtered iterator of log_rev_iterator matching on a regex.

    :param branch: The branch being logged.
    :param generate_delta: Whether to generate a delta for each revision.
    :param match: A dictionary with properties as keys and lists of strings
        as values. To match, a revision may match any of the supplied strings
        within a single property but must match at least one string for each
        property.
    :param log_rev_iterator: An input iterator containing all revisions that
        could be displayed, in lists.
    :return: An iterator over lists of ((rev_id, revno, merge_depth), rev,
        delta).
    N(R
t	iteritemstretcompilet
IGNORECASEt
_filter_re(RRR:RtktvtxtsearchRE((s./usr/lib/python2.7/dist-packages/bzrlib/log.pyt_make_search_filterQs
Jcc@sOxH|D]@}g|D]}t||dr|^q}|r|VqqWdS(Ni(t
_match_filter(RRRRtnew_revs((s./usr/lib/python2.7/dist-packages/bzrlib/log.pyRfs
,cC@si|jfd6|jfd6|jd6t|jd6}g|jD]}|D]}|^qWqM|d<x8|D]0\}}||krwt|||rwtSqwWtS(NRBt	committertauthortbugsR(	RBRtget_apparent_authorsRt	iter_bugst
itervaluest_match_any_filterRmR(RRtstringst
inner_listtitemRR((s./usr/lib/python2.7/dist-packages/bzrlib/log.pyRls


 cC@s2tg|D]!}tdt|j|^q
S(N(tanytfilterR
RR8(RtresR((s./usr/lib/python2.7/dist-packages/bzrlib/log.pyRzscC@s+|r|r|St|j||||S(sAdd revision deltas to a log iterator if needed.

    :param branch: The branch being logged.
    :param generate_delta: Whether to generate a delta for each revision.
      Permitted values are None, 'full' and 'partial'.
    :param search: A user text search string.
    :param log_rev_iterator: An input iterator containing all revisions that
        could be displayed, in lists.
    :param fileids: If non empty, only revisions matching one or more of
      the file-ids are to be kept.
    :param direction: the direction in which view_revisions is sorted
    :return: An iterator over lists of ((rev_id, revno, merge_depth), rev,
        delta).
    (t_generate_deltasR(RRR8RtfileidsR*((s./usr/lib/python2.7/dist-packages/bzrlib/log.pyR}scc@s|dk	ot|dk}|rNt|}|dkrEd}qTd}nd}xs|D]k}|rr|rrdSg|D]}	|	d^qy}
g}|dkr|r|j|
}xt||D]*\}	}
|j|	d|	d|
fqWn|j|
|}xt||D]\}	}
|r|
dks|
jrKqqt|
|||dkrpd}
q|dkr|	dd}|j|}
qn|j|	d|	d|
fqW|Vq[WdS(s\Create deltas for each batch of revisions in log_rev_iterator.

    If we're only generating deltas for the sake of filtering against
    file-ids, we stop generating deltas once all file-ids reach the
    appropriate life-cycle point. If we're receiving data newest to
    oldest, then that life-cycle point is 'add', otherwise it's 'remove'.
    iR'taddtremoveNiR)(	R
Rztsettget_deltas_for_revisionsRREthas_changedt_update_fileidstget_revision_delta(RRR0RR*t
check_fileidst
fileid_settstop_onRRt	revisionsRtdeltasRRT((s./usr/lib/python2.7/dist-packages/bzrlib/log.pyRs:			

%	"cC@s|dkrGx|jD]*}|d|kr|j|dqqWnG|dkrx8|jD]*}|d|kr]|j|dq]q]WndS(sUpdate the set of file-ids to search based on file lifecycle events.

    :param fileids: a set of fileids to update
    :param stop_on: either 'add' or 'remove' - take file-ids out of the
      fileids set once their add or remove entry is detected respectively
    RitdeleteN(taddedRtremoved(RRRR((s./usr/lib/python2.7/dist-packages/bzrlib/log.pyRscc@s|j}x|D]y}g|D]\}}}|d^q}|j|}	gt||	D]#\}
}|
d||
df^q[}|VqWdS(sExtract revision objects from the repository

    :param branch: The branch being logged.
    :param generate_delta: Whether to generate a delta for each revision.
    :param search: A user text search string.
    :param log_rev_iterator: An input iterator containing all revisions that
        could be displayed, in lists.
    :return: An iterator over lists of ((rev_id, revno, merge_depth), rev,
        delta).
    iiN(Rt
get_revisionsR(RRR8RRRRt_trevision_idsRRtrevision((s./usr/lib/python2.7/dist-packages/bzrlib/log.pyt_make_revision_objectss	
&6c	c@sd}x|D]}t|}xltrgtt||D]\}}|^q>}t|dkrlPn|Vtt|dd}q"Wq
WdS(sGroup up a single large batch into smaller ones.

    :param branch: The branch being logged.
    :param generate_delta: Whether to generate a delta for each revision.
    :param search: A user text search string.
    :param log_rev_iterator: An input iterator containing all revisions that
        could be displayed, in lists.
    :return: An iterator over lists of ((rev_id, revno, merge_depth), rev,
        delta).
    i	ig?iN(RRRtrangeRzRtint(	RRR8RtnumtbatchRtdetailtstep((s./usr/lib/python2.7/dist-packages/bzrlib/log.pyt_make_batch_filters
	.c	C@sY|j\}}d}|dkr-d}nOt|tjrZ|j}|jpTd}n"|j||}|j|}d}|dkr|}nOt|tjr|j}|jp|}n"|j||}|j|}|dkrO|t	j
ks|t	j
kr(tjt
dn||krOtjt
dqOn||fS(s0Get and check revision limits.

    :param  branch: The branch containing the revisions.

    :param  start_revision: The first revision to be logged.
            For backwards compatibility this may be a mainline integer revno,
            but for merge revision support a RevisionInfo is expected.

    :param  end_revision: The last revision to be logged.
            For backwards compatibility this may be a mainline integer revno,
            but for merge revision support a RevisionInfo is expected.

    :return: (start_rev_id, end_rev_id) tuple.
    iisLogging revision 0 is invalid.s3Start revision must be older than the end revision.N(RR
RbtrevisionspectRevisionInfoRTRtcheck_real_revnot
get_rev_idRRRRR(	RR,R-tbranch_revnot
branch_rev_idRtstart_revnoRt	end_revno((s./usr/lib/python2.7/dist-packages/bzrlib/log.pyRs4		
		
cC@s|j\}}|dkr"dSd}|dkr=d}n@t|tjrj|j}|jpdd}n|j||}d}|dkr|}n@t|tjr|j}|jp|}n|j||}|tj	ks|tj	krt
jtdn||kr2t
jtdn||krBdS|}	i}
g}|j
j}x|j|tj	fD]]}
|	|kr|	|
|
<|j|
Pn|	|kr|	|
|
<|j|
n|	d8}	q|W|jd|j||
||fS(sGet the mainline revisions from the branch.

    Generates the list of mainline revisions for the branch.

    :param  branch: The branch containing the revisions.

    :param  start_revision: The first revision to be logged.
            For backwards compatibility this may be a mainline integer revno,
            but for merge revision support a RevisionInfo is expected.

    :param  end_revision: The last revision to be logged.
            For backwards compatibility this may be a mainline integer revno,
            but for merge revision support a RevisionInfo is expected.

    :return: A (mainline_revs, rev_nos, start_rev_id, end_rev_id) tuple.
    iisLogging revision 0 is invalid.s3Start revision must be older than the end revision.N(NNNN(NNNN(RR
RbRRRTRRRRRRRRRRRER'(RR,R-Rtbranch_last_revisionRRRRRtrev_nost
mainline_revsR R"((s./usr/lib/python2.7/dist-packages/bzrlib/log.pyt_get_mainline_revs6sV		
		
	




cC@s|jj}|j}g|D]\}}}||f^q}	d}
t}d}x[tdt|	|D]A}
|	|
|
|!}
|jg||
D]}|d^qqnW~	~
g}dg}x|D]}|\}}}|t|kr|j|n||d3||d<||krxftt|D]O}||}|dk	r:|sl|ddkr|j|d||<qq:q:WqqW|S(sReturn the list of revision ids which touch a given file id.

    The function filters view_revisions and returns a subset.
    This includes the revisions which directly change the file id,
    and the revisions which merge these changes. So if the
    revision graph is::

        A-.
        |\ \
        B C E
        |/ /
        D |
        |\|
        | F
        |/
        G

    And 'C' changes a file, then both C and D will be returned. F will not be
    returned even though it brings the changes to C into the branch starting
    with E. (Note that if we were using F as the tip instead of G, then we
    would see C, D, F.)

    This will also be restricted based on a subset of the mainline.

    :param branch: The branch where we can get text revision information.

    :param file_id: Filter out revisions that do not touch file_id.

    :param view_revisions: A list of (revision_id, dotted_revno, merge_depth)
        tuples. This is the list of revisions which will be filtered. It is
        assumed that view_revisions is in merge_sort order (i.e. newest
        revision first ).

    :param include_merges: include merge revisions in the result or not

    :return: A list of (revision_id, dotted_revno, merge_depth) tuples.
    iiiiiN(	Rtget_file_graphRR
RtxrangeRzRHRE(RRRRR RRTRRt	text_keyst	next_keystmodified_text_revisionst
chunk_sizetstartRRItcurrent_merge_stacktinfotidxtnode((s./usr/lib/python2.7/dist-packages/bzrlib/log.pyRs6)	(	(	



cC@sdd|fg|}g}xB|D]:}|d|krL|j|gq#|dj|q#Wx>|D]6}t|dkrht|d|d|d)qhqhW|jg}x|D]}|j|qW|dkrg|D],}|ddk	r|ddk	r|^q}n|S(sReverse revisions by depth.

    Revisions with a different depth are sorted as a group with the previous
    revision of that depth.  There may be no topological justification for this,
    but it looks much nicer.
    iiiiN(R
RERzRR'textend(tmerge_sorted_revisionst_depthtzd_revisionstvalRRItchunkR((s./usr/lib/python2.7/dist-packages/bzrlib/log.pyRs 

"

<R}cB@s,eZdZddddddddZRS(sA revision to be logged (by LogFormatter.log_revision).

    A simple wrapper for the attributes of a revision to be logged.
    The attributes may or may not be populated, as determined by the
    logging options and the log formatter capabilities.
    icC@sa||_|dkr!d|_nt||_||_||_||_||_||_dS(N(	RR
RRRRRvRRC(R[RRRRRvRRC((s./usr/lib/python2.7/dist-packages/bzrlib/log.pyR_s					N(R\R]R^R
R_(((s./usr/lib/python2.7/dist-packages/bzrlib/log.pyR}sRccB@seZdZdZedddedddZdZdZdZ	dZ
dZd	Zedd
Z
dZdZd
ZdZdZdZRS(sAbstract class to display log messages.

    At a minimum, a derived class must implement the log_revision method.

    If the LogFormatter needs to be informed of the beginning or end of
    a log it should implement the begin_log and/or end_log hook methods.

    A LogFormatter should define the following supports_XXX flags
    to indicate which LogRevision attributes it supports:

    - supports_delta must be True if this log formatter supports delta.
      Otherwise the delta attribute may not be populated.  The 'delta_format'
      attribute describes whether the 'short_status' format (1) or the long
      one (2) should be used.

    - supports_merge_revisions must be True if this log formatter supports
      merge revisions.  If not, then only mainline revisions will be passed
      to the formatter.

    - preferred_levels is the number of levels this formatter defaults to.
      The default value is zero meaning display all levels.
      This value is only relevant if supports_merge_revisions is True.

    - supports_tags must be True if this log formatter supports tags.
      Otherwise the tags attribute may not be populated.

    - supports_diff must be True if this log formatter supports diffs.
      Otherwise the diff attribute may not be populated.

    - supports_signatures must be True if this log formatter supports GPG
      signatures.

    Plugins can register functions to show custom revision properties using
    the properties_handler_registry. The registered function
    must respect the following interface description::

        def my_show_properties(properties_dict):
            # code that returns a dict {'name':'value'} of the properties
            # to be shown
    itoriginalc		C@s||_|dk	r!||_nt|d||_||_||_|dkr]d}n||_||_||_d|_	||_
dS(sCreate a LogFormatter.

        :param to_file: the file to output to
        :param to_exact_file: if set, gives an output stream to which
             non-Unicode diffs are written.
        :param show_ids: if True, revision-ids are to be displayed
        :param show_timezone: the timezone to use
        :param delta_format: the level of delta information to display
          or None to leave it to the formatter to decide
        :param levels: the number of levels to display; None or -1 to
          let the log formatter decide.
        :param show_advice: whether to show advice at the end of the
          log or not
        :param author_list_handler: callable generating a list of
          authors to display for a given revision
        tstreamiiN(tto_fileR
t
to_exact_fileRetshow_idst
show_timezonetdelta_formatR>t_show_advicet_merge_countt_author_list_handler(	R[R1R3R4R5R>RpR2tauthor_list_handler((s./usr/lib/python2.7/dist-packages/bzrlib/log.pyR_=s								cC@sRt|dtrB|jdks0|jdkrK|j|_qKn	d|_|jS(s1Get the number of levels to display or 0 for all.tsupports_merge_revisionsiiN(ReRmR>R
tpreferred_levels(R[((s./usr/lib/python2.7/dist-packages/bzrlib/log.pyRles
	cC@stddS(sSLog a revision.

        :param  revision:   The LogRevision to be logged.
        s not implemented in abstract baseN(RY(R[R	((s./usr/lib/python2.7/dist-packages/bzrlib/log.pyRonscC@sc|jr_|jdkr_|jdkr_|j}|rL|jj|n|jjdndS(s6Output user advice, if any, when the log is completed.iis5Use --include-merged or -n0 to see merged revisions.
N(R6R>R7tget_advice_separatorR1twrite(R[t
advice_sep((s./usr/lib/python2.7/dist-packages/bzrlib/log.pyRpus'	cC@sdS(s8Get the text separating the log from the closing advice.R((R[((s./usr/lib/python2.7/dist-packages/bzrlib/log.pyR<~scC@s&tj|j\}}|r"|S|S(N(tconfigtparse_usernameR(R[Rtnametaddress((s./usr/lib/python2.7/dist-packages/bzrlib/log.pytshort_committerscC@s|j|ddtddS(Ntfirsttshorttseps, (tauthorsR(R[R((s./usr/lib/python2.7/dist-packages/bzrlib/log.pytshort_authorsc
C@s|jdk	r|j}ntj|}||}|rxStt|D]<}tj||\}}	|r|||<qO|	||<qOWn|dk	r|j|}n|S(sGenerate list of authors, taking --authors option into account.

        The caller has to specify the name of a author list handler,
        as provided by the author list registry, using the ``who``
        argument.  That name only sets a default, though: when the
        user selected a different author list generation using the
        ``--authors`` command line switch, as represented by the
        ``author_list_handler`` constructor argument, that value takes
        precedence.

        :param rev: The revision for which to generate the list of authors.
        :param who: Name of the default handler.
        :param short: Whether to shorten names to either name or address.
        :param sep: What separator to use for automatic concatenation.
        N(	R8R
tauthor_list_registryRuRRzR?R@R(
R[RtwhoRERFR9tnamestiRARB((s./usr/lib/python2.7/dist-packages/bzrlib/log.pyRGs
cC@s3t|jjdkr+|jd7_dSdSdS(s<Get the merge marker to include in the output or '' if none.is [merge]RN(RzRR{R7(R[R	((s./usr/lib/python2.7/dist-packages/bzrlib/log.pytmerge_markerscC@s8x1|j|D] }|jjd||fqWdS(sDisplays the custom properties returned by each registered handler.

        If a registered handler raises an error it is propagated.
        s%s%s
N(tcustom_propertiesR1R=(R[R	tindenttline((s./usr/lib/python2.7/dist-packages/bzrlib/log.pytshow_propertiesscC@sL|j|}x6tjD](\}}|j|j||qW|S(sFormat the custom properties returned by each registered handler.

        If a registered handler raises an error it is propagated.

        :return: a list of formatted lines (excluding trailing newlines)
        (t_foreign_info_propertiestproperties_handler_registryRR)t_format_properties(R[R	tlinestkeythandler((s./usr/lib/python2.7/dist-packages/bzrlib/log.pyRNs cC@st|tjr1|j|jjj|jSd|jkrDgSytj	j
|j\}}Wntjk
rzgSX|j|jj|S(seCustom log displayer for foreign revision identifiers.

        :param rev: Revision object.
        t:(
RbtforeigntForeignRevisionRTtmappingtvcstshow_foreign_revidt
foreign_revidR"tforeign_vcs_registrytparse_revision_idRtInvalidRevisionId(R[RR^R[((s./usr/lib/python2.7/dist-packages/bzrlib/log.pyRRscC@s<g}x/|jD]!\}}|j|d|qW|S(Ns: (titemsRE(R[t
propertiesRURVtvalue((s./usr/lib/python2.7/dist-packages/bzrlib/log.pyRTscC@s<x5|jjdD]}|j|d|fqWdS(Ns
s%s
(trstriptsplitR=(R[R1RROtl((s./usr/lib/python2.7/dist-packages/bzrlib/log.pyR9sN(R\R]R^R;RmR
R_RlRoRpR<RCRHRGRMRQRNRRRTR9(((s./usr/lib/python2.7/dist-packages/bzrlib/log.pyRcs$(	&								"					t-i<tLongLogFormattercB@sYeZeZdZeZeZeZeZdZ	dZ
dZdZdZ
RS(icO@sGtt|j|||jdkr7|j|_n|j|_dS(NR/(tsuperRiR_R4t_date_string_original_timezonetdate_stringt_date_string_with_timezone(R[targstkwargs((s./usr/lib/python2.7/dist-packages/bzrlib/log.pyR_scC@st|j|jpd|jS(Ni(Rt	timestampttimezoneR4(R[R((s./usr/lib/python2.7/dist-packages/bzrlib/log.pyRmscC@st|j|jpdS(Ni(R	RpRq(R[R((s./usr/lib/python2.7/dist-packages/bzrlib/log.pyRks	c	C@sd|j}tg}|jdk	rK|jd|j|j|fn|jrt|jddj|jn|js|jdkr|jd|j	j
fn|jrx+|j	jD]}|jd|fqWn|j|j
|j	|j	j}|j|j	d}||gkrI|jddj|fn|jd	|f|j	jjd
d}|dk	r|jd|fn|jd|j|j	f|jdk	r|jd
|jn|jd|j	js|jdnC|j	jjd}x+|jdD]}	|jd|	fq,W|j}
|
jd|d|j|f|jdk	rddlm}||
|jdtd|jd|n|jdk	r|
j|d|
j|j|j |j||j jndS(s%Log a revision, either merged or not.s    srevno: %s%sstags: %ss, srevision-id: %ss
parent: %stalls
author: %ss
committer: %ssbranch-nicksbranch nick: %ss
timestamp: %sssignature: smessage:s  (no message)s
s
s  %ss%s%s
i(treport_deltatshort_statusR3ROsdiff:
N(!Rt	_LONG_SEPRR
RERMRvRR3RR"R{R)RNRRGRcRuRlRCRBReRfR1R=Rtbzrlib.deltaRsRmRtflushR9R2(R[R	RORUt	parent_idRRGtbranch_nickRBRgR1Rs((s./usr/lib/python2.7/dist-packages/bzrlib/log.pyRosR
		 	  
	$
cC@sdddS(s8Get the text separating the log from the closing advice.Rhi<s
((R[((s./usr/lib/python2.7/dist-packages/bzrlib/log.pyR<?s(R\R]RR:R;RiRhRjRkR_RmRkRoR<(((s./usr/lib/python2.7/dist-packages/bzrlib/log.pyRis				7tShortLogFormattercB@s8eZeZdZeZeZeZdZdZ	RS(icO@s&tt|j||i|_dS(N(RjRzR_trevno_width_by_depth(R[RnRo((s./usr/lib/python2.7/dist-packages/bzrlib/log.pyR_LscC@s{|j}d|}|jj|}|dkrw|jdksX|jjddkrad}nd}||j|<nd|d}|j}d}|jrd	d
j|j}n|j	|d||jpd|j
|jt|jj
|jjpd|jd
ddt||j|f|j|j|||jsW|jdkr||j	||d|jjfn|jjs|j	||dnK|jjjd}x3|jdD]"}	|j	||d|	fqW|jdk	r?ddlm}
|
||jd|jdkd|jd||n|jdk	rj|j|j|jdn|j	ddS(Ns    Riiit iRs {%s}s, s%*s %s	%s%s%s
itdate_fmts%Y-%m-%dtshow_offsetsrevision-id:%s
s
(no message)
s
s
s%s
(RsRtR3ROs      (RR{RuR
RtfindR1RvRR=RHRRRpRqR4RmRMRQR3R"RBReRfRRvRsR5RR9R2(R[R	RROtrevno_widthtoffsetR1RvRBRgRs((s./usr/lib/python2.7/dist-packages/bzrlib/log.pyRoPsJ	
'			 (
R\R]RR:R;RiRhRjR_Ro(((s./usr/lib/python2.7/dist-packages/bzrlib/log.pyRzDs	tLineLogFormattercB@sVeZeZdZeZdZdZdZdZ	dZ
dddZRS(	icO@sHtt|j||t}|dk	r;|d}n||_dS(Ni(RjRR_RR
t
_max_chars(R[RnRotwidth((s./usr/lib/python2.7/dist-packages/bzrlib/log.pyR_s
	
cC@s2|dkst||kr"|S||d dS(Nis...(R
Rz(R[Rtmax_len((s./usr/lib/python2.7/dist-packages/bzrlib/log.pyttruncatescC@s+t|j|jpd|jdddtS(NiR}s%Y-%m-%dR~(RRpRqR4Rm(R[R((s./usr/lib/python2.7/dist-packages/bzrlib/log.pyRlscC@s|js
dS|jSdS(Ns(no message)(RB(R[R((s./usr/lib/python2.7/dist-packages/bzrlib/log.pyRBs	cC@sRd|j}|jj|j|j|j|j|j||jjddS(Ns  s
(RR1R=t
log_stringRRRRv(R[R	RO((s./usr/lib/python2.7/dist-packages/bzrlib/log.pyRos
RcC@sg}|r |jd|n|d
k	rY|j|j|j||ddn|j|j||j|j|t|jdkr|jdn|rddj|}|j|n|j|j|j|dj|j	d	|S(sFormat log info into one string. Truncate tail of string

        :param revno:      revision number or None.
                           Revision numbers counts from 1.
        :param rev:        revision object
        :param max_chars:  maximum length of resulting string
        :param tags:       list of tags or None
        :param prefix:     string to prefix each line
        :return:           formatted truncated string
        s%s:iiis[merge]s{%s}s, R|s
N(
RER
RRHRlRzR{Rtget_summaryRe(R[RRt	max_charsRvtprefixtoutttag_str((s./usr/lib/python2.7/dist-packages/bzrlib/log.pyRs-N(
R\R]RR:R;RhR_RRlRBRoR
R(((s./usr/lib/python2.7/dist-packages/bzrlib/log.pyRs					tGnuChangelogLogFormattercB@seZeZeZdZRS(cC@s|j}t|jj|jjp$d|jdddt}|j|jddd}|jdd	}|j	d
||f|j
dk	r8|j
jr8xI|j
j
|j
j|j
jD]'}|d \}|j	d|fqWx;|j
jD]-}|d
 \}}|j	d||fqW|j	dn|jjsT|j	dnV|jjjd}	x1|	jdD] }
|j	d|
jfqyW|j	ddS(s%Log a revision, either merged or not.iR}s%Y-%m-%dR~RDRFs, s <s  <s%s  %s

is	* %s:
is	* %s:
	* %s:
s
s	No commit message
s
s	%s
N(R1RRRpRqR4RmRGtreplaceR=RR
RRRtmodifiedtrenamedRBReRftlstrip(R[R	R1tdate_strt
committer_strtctpathtoldpathtnewpathRBRg((s./usr/lib/python2.7/dist-packages/bzrlib/log.pyRos.			'
(R\R]RR:RiRo(((s./usr/lib/python2.7/dist-packages/bzrlib/log.pyRscC@std}|jd||S(N(RR
R(RRR5((s./usr/lib/python2.7/dist-packages/bzrlib/log.pytline_logstLogFormatterRegistrycB@s eZdZdZdZRS(sRegistry for log formatterscO@s|j|||S(sConstruct a formatter from arguments.

        :param name: Name of the formatter to construct.  'short', 'long' and
            'line' are built-in.
        (Ru(R[RARnRo((s./usr/lib/python2.7/dist-packages/bzrlib/log.pytmake_formatterscC@s"|j}|j|jdS(Nt
log_format(tget_config_stackRu(R[RR((s./usr/lib/python2.7/dist-packages/bzrlib/log.pytget_defaults(R\R]R^RR(((s./usr/lib/python2.7/dist-packages/bzrlib/log.pyRs	REsModerately short log format.tlongsDetailed log format.RPs&Log format with one line per revision.s
gnu-changelogs#Format used by GNU ChangeLog files.cC@stj||dS(N(tlog_formatter_registrytregister(RAt	formatter((s./usr/lib/python2.7/dist-packages/bzrlib/log.pytregister_formatter
scO@sHytj|||SWn*tk
rCtjtd|nXdS(sConstruct a formatter from arguments.

    name -- Name of the formatter to construct; currently 'long', 'short' and
        'line' are supported.
    sunknown log formatter: %rN(RRtKeyErrorRRR(RARnRo((s./usr/lib/python2.7/dist-packages/bzrlib/log.pyt
log_formatters
cC@s|jS(N(R(R((s./usr/lib/python2.7/dist-packages/bzrlib/log.pytauthor_list_allscC@s4|j}y|dgSWntk
r/gSXdS(Ni(Rt
IndexError(Rtlst((s./usr/lib/python2.7/dist-packages/bzrlib/log.pytauthor_list_first!s

cC@s
|jgS(N(R(R((s./usr/lib/python2.7/dist-packages/bzrlib/log.pytauthor_list_committer)sRrsAll authorsRDsThe first authorRs
The committerc
C@s|dkr0tjttjdd}nt|dtd|dd}d}xktt	t
|t
|D]H}t
||kst
||ks||||krv|}PqvqvW|dkr|jddS|t
|kr|jd	d
|jdxYt|t
|D]B}|j
j||}t||dd
d}	|j|	q%W|jd	d
|jdn|t
|kr|jdt||ddtddd|ddt
|ddndS(s=Show the change in revision history comparing the old revision history to the new one.

    :param branch: The branch where the revisions exist
    :param old_rh: The old revision history
    :param new_rh: The new revision history
    :param to_file: A file to write the results to. If None, stdout will be used
    RRR3R1R4R/sNothing seems to have changed
Nt*i<s
Removed Revisions:
iis

sAdded Revisions:
R7R*RR,R-R8(R
tcodecst	getwriterRtsyststdoutRRmRtmaxRzR=RRtget_revisionR}RoR=(
Rtold_rhtnew_rhR1RR5tbase_idxRLRRr((s./usr/lib/python2.7/dist-packages/bzrlib/log.pytshow_changed_revisions9sJ			



cC@sg}t}g}t}|j}|j|}|j|}	d}
t}t}x|si|r2|ry|j}
Wntk
rt}qX|j|
|j	|
|
|kr|
}
Pqn|r]y|	j}Wntk
rt}q/X|j||j	|||kr/|}
Pq/q]q]W|j
|j
|
dk	r||j|
d}||j|
d}n||fS(sCalculate the uncommon lefthand history between two revisions.

    :param old_revision_id: The original revision id.
    :param new_revision_id: The new revision id.
    :param repository: The repository to use for the calculation.

    return old_history, new_history
    iN(RRRR
Rtnextt
StopIterationRmRERR'tindex(told_revision_idtnew_revision_idRtold_historyt
old_revisionstnew_historyt
new_revisionsR tnew_itertold_itert
stop_revisiontdo_oldtdo_newtnew_revisiontold_revision((s./usr/lib/python2.7/dist-packages/bzrlib/log.pytget_history_changepsJ			









c
C@s7|j\}}t|||j\}}|gkrV|gkrV|jddStj|}|dtd|dd}	|gkr|jdd|jd	t|j|||	|jdd|jd
n|gkr3|jd|t|d}
t	||	dd
tddd|
ndS(sShow the changes made to a branch.

    :param branch: The branch to show changes about.
    :param output: A file-like object to write changes to.
    :param old_revno: The revno of the old tip.
    :param old_revision_id: The revision_id of the old tip.
    sNothing seems to have changed
NR3R1R4R/Ri<s
Removed Revisions:
s

sAdded Revisions:
iR7R*RR,(RRRR=RRRmt
show_flat_logRzR=R
(Rtoutputt	old_revnoRt	new_revnoRRRRR5R((s./usr/lib/python2.7/dist-packages/bzrlib/log.pytshow_branch_changes(


c	C@sj|t|d}|j|}x@t|D]2\}}t|||dd}|j|q0WdS(s1Show a simple log of the specified history.

    :param repository: The repository to retrieve revisions from.
    :param history: A list of revision_ids indicating the lefthand history.
    :param last_revno: The revno of the last revision_id in the history.
    :param lf: The log formatter to use.
    iiN(RzRt	enumerateR}R
Ro(	RR!t
last_revnoR5RRRLRRr((s./usr/lib/python2.7/dist-packages/bzrlib/log.pyRs
cC@sHddlm}tjj|d\}}}||jj|re|g|j|d}n|g|d}g}|||d\}	}
|gdgfkr|g|	|
fS|	dkr|
dkr|dkr|j	}nd}xC|D]}|j
|}
t||
}|
dkr|dkry|jd}Wn t
jk
rjd}
d}qX|jj|}n|r|j
|}
t||
}qn|j||
|fqWnq|	|
kr0|jj|
j}xM|D]:}|j
|}
t||
}|j||
|fqWn|
j}|dkrT|j	}n|jj|}d}x|D]}|j
|}
t||
}|
dkr|dkr|	j}|dkr|jd}|jj|}q|jj|}n|j
|}
t||
}n|j||
|fqsW|||	|
fS(sFind file-ids and kinds given a list of files and a revision range.

    We search for files at the end of the range. If not found there,
    we try the start of the range.

    :param revisionspec_list: revision range as parsed on the command line
    :param file_list: the list of paths given on the command line;
      the first of these can be a branch location or a file path,
      the remainder must be file paths
    :param add_cleanup: When the branch returned is read locked,
      an unlock call will be queued to the cleanup.
    :return: (branch, info_list, start_rev_info, end_rev_info) where
      info_list is a list of (relative_path, file_id, kind) tuples where
      kind is one of values 'directory', 'file', 'symlink', 'tree-reference'.
      branch will be read-locked.
    i(t_get_revision_rangeitloguN(tbzrlib.builtinsRt
controldirt
ControlDirtopen_containing_tree_or_branchRdRgtsafe_relpath_filesR
t
basis_treetpath2idt_get_kind_for_file_idRRRRRRERT(trevisionspec_listt	file_listtadd_cleanupRttreetbRtrelpathst	info_listtstart_rev_infotend_rev_infottree1tfpRtkindtrev1RT((s./usr/lib/python2.7/dist-packages/bzrlib/log.pyt_get_info_for_log_filessp			


	
	cC@s!|dk	r|j|SdSdS(s9Return the kind of a file-id or None if it doesn't exist.N(R
R(RR((s./usr/lib/python2.7/dist-packages/bzrlib/log.pyR/s
cC@s|jjdr|jdjd}g|D]}|jdd^q/}g|D]2}t|dkrT|ddkrT|d^qT}|ridj|tddt|6SniS(	NRs
R|itfixedis	fixes bugs
fixes bugs(Rcthas_keyRfRzRtngettext(R	t	bug_linesRPtbug_rowstrowtfixed_bug_urls((s./usr/lib/python2.7/dist-packages/bzrlib/log.pyt_bugs_properties_handler:s%
2&tbugs_properties_handler(ZR^t
__future__RRt	cStringIORt	itertoolsRRRRtwarningsRtbzrlib.lazy_importRtglobalsRLRRtbzrlib.osutilsRR	R
RRR&R
RmR=RRFR2RJRWtobjectRXR3t	ExceptionRtRsRRRRRRRRRRRRRRRRRR
RRRRRR}RcRuRiRzRRRtRegistryRRRRRRRRRIRRRRRRRSRR(((s./usr/lib/python2.7/dist-packages/bzrlib/log.pyt<module>0s	(		1?
		X		B~1	9			(*	&					5				2	TS
TAA%							6	2			_			

Copyright © 2017 || Recoded By Mr.Bumblebee