-=[ Mr. Bumblebee ]=-
_Indonesia_

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


.=Pc@@sddlmZddlZddlZddlmZeedddlmZddl	m
Z
ddlmZddl
mZmZdd	lmZd
efdYZdejfd
YZeaeZet_edZdZdZdZdZdZdZ dZ!dZ"e#dZ$e#e#dZ%dZ&dZ'dZ(dZ)dZ*defdYZ+d efd!YZ,e,e+_-e.d"Z/d#Z0d$Z1d%Z2d&Z3d'Z4e.d(Z5eed)Z6d*Z7d+Z8d,Z9e.d-Z:d.Z;d/Z<d0efd1YZ=d2efd3YZ>d4ejfd5YZ?e?Z@dS(6i(tabsolute_importN(tlazy_imports
import errno
import threading

import bzrlib
from bzrlib import (
    config,
    cleanup,
    cmdline,
    debug,
    errors,
    i18n,
    option,
    osutils,
    trace,
    ui,
    )
(tHooks(tgettext(tOption(tdisable_pluginstload_plugins(tregistrytCommandInfocB@s&eZdZdZedZRS(sInformation about a command.cC@s
||_dS(s$The list of aliases for the command.N(taliases(tselfR	((s3/usr/lib/python2.7/dist-packages/bzrlib/commands.pyt__init__<scC@s
||jS(s2Factory to construct a CommandInfo from a command.(R	(tklasstcommand((s3/usr/lib/python2.7/dist-packages/bzrlib/commands.pytfrom_command@s(t__name__t
__module__t__doc__RtclassmethodR(((s3/usr/lib/python2.7/dist-packages/bzrlib/commands.pyR9s	tCommandRegistrycB@sDeZdZdZdZedZedZdZ	RS(s	Special registry mapping command names to command classes.
    
    :ivar overridden_registry: Look in this registry for commands being
        overridden by this registry.  This can be used to tell plugin commands
        about the builtin they're decorating.
    cC@s&tjj|d|_i|_dS(N(RtRegistryRtNonetoverridden_registryt_alias_dict(R
((s3/usr/lib/python2.7/dist-packages/bzrlib/commands.pyRNs	cC@s(|jj||}tjj||S(N(RtgetRR(R
tcommand_namet	real_name((s3/usr/lib/python2.7/dist-packages/bzrlib/commands.pyRTscC@s!|jdrt|S|SdS(Ntcmd_(t
startswitht_unsquish_command_name(R((s3/usr/lib/python2.7/dist-packages/bzrlib/commands.pyt	_get_nameXs
cC@s0|j}|j|}y|j|}WnMtk
rzd}|jr{y|jj|}Wqwtk
rsqwXq{nXtj|}y&tj	j
|||d|d|WnXtk
r
tjd|tjdt
j|jtjdt
j|jnXx|jD]}||j|<qW|S(sFUtility function to help register a command

        :param cmd: Command subclass to register
        :param decorate: If true, allow overriding an existing command
            of the same name; the old command is returned by this function.
            Otherwise it is an error to try to override an existing command.
        toverride_existingtinfos(Two plugins defined the same command: %rsNot loading the one in %rs.Previously this command was registered from %rN(RRRtKeyErrorRRRRRRtregisterttracetwarningtsystmodulesRR	R(R
tcmdtdecoratetktk_unsquishedtpreviousR ta((s3/usr/lib/python2.7/dist-packages/bzrlib/commands.pyR"_s0	
	

		cC@sV|j|}tjj||||dt|x|D]}||j|<q;WdS(sRegister a command without loading its module.

        :param command_name: The primary name of the command.
        :param aliases: A list of aliases for the command.
        :module_name: The module that the command lives in.
        R N(RRRt
register_lazyRR(R
RR	tmodule_nametkeyR,((s3/usr/lib/python2.7/dist-packages/bzrlib/commands.pyR-s


(
RRRRRtstaticmethodRtFalseR"R-(((s3/usr/lib/python2.7/dist-packages/bzrlib/commands.pyRFs		!cC@stj||S(s`Register a plugin command.

    Should generally be avoided in favor of lazy registration. 
    (tplugin_cmdsR"(R'R(((s3/usr/lib/python2.7/dist-packages/bzrlib/commands.pytregister_commandscC@sd|jddS(NRt-t_(treplace(R'((s3/usr/lib/python2.7/dist-packages/bzrlib/commands.pyt_squish_command_namescC@s|djddS(NiR5R4(R6(R'((s3/usr/lib/python2.7/dist-packages/bzrlib/commands.pyRscC@sZtjrdSddl}x*t|jjD]}tj|q2W|jjdS(Ni(tbuiltin_command_registrytkeystbzrlib.builtinst_scan_module_for_commandstbuiltinstvaluesR"t_register_lazy_builtins(tbzrlibt	cmd_class((s3/usr/lib/python2.7/dist-packages/bzrlib/commands.pyt_register_builtin_commandsscC@sRi}xE|jjD]4\}}|jdrt|}|||<qqW|S(NR(t__dict__t	iteritemsRR(tmoduletrtnametobjR((s3/usr/lib/python2.7/dist-packages/bzrlib/commands.pyR;scC@s$|jt|jt|S(sFind commands from bzr's core and plugins.
    
    This is not the public interface, just the default hook called by all_command_names.
    (tupdatetbuiltin_command_namestplugin_command_names(tnames((s3/usr/lib/python2.7/dist-packages/bzrlib/commands.pyt_list_bzr_commandsscC@s\t}xLtjdD]=}||}|dkrtdtjj|qqW|S(s"Return a set of all command names.t
list_commandsshook %s returned NoneN(tsettCommandthooksRtAssertionErrort
get_hook_name(RKthook((s3/usr/lib/python2.7/dist-packages/bzrlib/commands.pytall_command_namess	 cC@sttjS(sReturn list of builtin command names.
    
    Use of all_command_names() is encouraged rather than builtin_command_names
    and/or plugin_command_names.
    (RAR8R9(((s3/usr/lib/python2.7/dist-packages/bzrlib/commands.pyRIscC@s
tjS(s:Returns command names from commands registered by plugins.(R2R9(((s3/usr/lib/python2.7/dist-packages/bzrlib/commands.pyRJscC@sByt||SWn*tk
r=tjtd|nXdS(s{Return the command object for a command.

    plugins_override
        If true, plugin commands can override builtins.
    sunknown command "%s"N(t_get_cmd_objectR!terrorstBzrCommandErrorR(tcmd_nametplugins_override((s3/usr/lib/python2.7/dist-packages/bzrlib/commands.pytget_cmd_objects
cC@sd}xHtjdD]9}|||}|dk	r|r|jrPqqW|dkr|rx4tjdD]"}||}|dk	rqPqqqqWn|dkrtnxtjdD]}||qWt|dddkr||_n|S(sSGet a command object.

    :param cmd_name: The name of the command.
    :param plugins_override: Allow plugins to override builtins.
    :param check_missing: Look up commands not found in the regular index via
        the get_missing_command hook.
    :return: A Command object instance
    :raises KeyError: If no command is found.
    tget_commandtget_missing_commandtextend_commandt
invoked_asN(RRORPtplugin_nameR!tgetattrR^(RXRYt
check_missingR'RS((s3/usr/lib/python2.7/dist-packages/bzrlib/commands.pyRUs" 	cC@sFy+t|\}}tj|||Wntjk
rAnXdS(s,Probe for a plugin provider having cmd_name.N(tprobe_for_providerRVtCommandAvailableInPlugintNoPluginAvailable(RXtplugin_metadatatprovider((s3/usr/lib/python2.7/dist-packages/bzrlib/commands.pyt_try_plugin_providers	cC@sRx<tD]4}y|j||fSWqtjk
r:qXqWtj|dS(sLook for a provider for cmd_name.

    :param cmd_name: The command name.
    :return: plugin_metadata, provider for getting cmd_name.
    :raises NoPluginAvailable: When no provider can supply the plugin.
    N(tcommand_providers_registrytplugin_for_commandRVRd(RXRf((s3/usr/lib/python2.7/dist-packages/bzrlib/commands.pyRbs
cC@s2ytj|}Wntk
r&nX|S|S(sGet a command from bzr's core.(R8RR!(tcmd_or_NoneRXR@((s3/usr/lib/python2.7/dist-packages/bzrlib/commands.pyt_get_bzr_command(s
cC@s=|dk	r|Sddlm}|j|}|r9|SdS(s(Lookup a command that is a shell script.i(tExternalCommandN(Rtbzrlib.externalcommandRltfind_command(RjRXRltcmd_obj((s3/usr/lib/python2.7/dist-packages/bzrlib/commands.pyt_get_external_command3scC@sqytj|SWntk
r'nXxBtjD]4}tj|}||jkr5tj|Sq5W|S(s!Get a command from bzr's plugins.(R2RR!R9tget_infoR	(RjRXR/R ((s3/usr/lib/python2.7/dist-packages/bzrlib/commands.pyt_get_plugin_command>s
ROcB@seZdZgZgZgZdZdZe	Z
eZdZ
dZdZdZde	ee	dZedZdZdd	Zd
ZdZddZd
ZdZdZdZdZdZRS(s	Base class for commands.

    Commands are the heart of the command-line bzr interface.

    The command object mostly handles the mapping of command-line
    parameters into one or more bzrlib operations, and of the results
    into textual output.

    Commands normally don't have any state.  All their arguments are
    passed in to the run method.  (Subclasses may take a different
    policy if the behaviour of the instance needs to depend on e.g. a
    shell plugin and not just its Python class.)

    The docstring for an actual command should give a single-line
    summary, then a complete description of the command.  A grammar
    description will be inserted.

    :cvar aliases: Other accepted names for this command.

    :cvar takes_args: List of argument forms, marked with whether they are
        optional, repeated, etc.  Examples::

            ['to_location', 'from_branch?', 'file*']

        * 'to_location' is required
        * 'from_branch' is optional
        * 'file' can be specified 0 or more times

    :cvar takes_options: List of options that may be given for this command.
        These can be either strings, referring to globally-defined options, or
        option objects.  Retrieve through options().

    :cvar hidden: If true, this command isn't advertised.  This is typically
        for commands intended for expert users.

    :cvar encoding_type: Command objects will get a 'outf' attribute, which has
        been setup to properly handle encoding of unicode strings.
        encoding_type determines what will happen when characters cannot be
        encoded:

        * strict - abort if we cannot decode
        * replace - put in a bogus character (typically '?')
        * exact - do not encode sys.stdout

        NOTE: by default on Windows, sys.stdout is opened as a text stream,
        therefore LF line-endings are converted to CRLF.  When a command uses
        encoding_type = 'exact', then sys.stdout is forced to be a binary
        stream, and line-endings will not mangled.

    :cvar invoked_as:
        A string indicating the real name under which this command was
        invoked, before expansion of aliases.
        (This may be None if the command was constructed and run in-process.)

    :cvar hooks: An instance of CommandHooks.

    :cvar __doc__: The help shown by 'bzr help command' for this command.
        This is set by assigning explicitly to __doc__ so that -OO can
        be used::

            class Foo(Command):
                __doc__ = "My help goes here"
    tstrictcC@sg|_|jdS(s&Construct an instance of this command.N(tsupported_std_optionst
_setup_run(R
((s3/usr/lib/python2.7/dist-packages/bzrlib/commands.pyRs	cO@s|jj|||dS(swRegister a function to call after self.run returns or raises.

        Functions will be called in LIFO order.
        N(t
_operationtadd_cleanup(R
tcleanup_functargstkwargs((s3/usr/lib/python2.7/dist-packages/bzrlib/commands.pyRwscC@s|jjdS(sExecute and empty pending cleanup functions immediately.

        After cleanup_now all registered cleanups are forgotten.  add_cleanup
        may be called again after cleanup_now; these cleanups will be called
        after self.run returns or raises (or when cleanup_now is next called).

        This is useful for releasing expensive or contentious resources (such
        as write locks) before doing further work that does not require those
        resources (such as writing results to self.outf). Note though, that
        as it releases all resources, this may release locks that the command
        wants to hold, so use should be done with care.
        N(Rvtcleanup_now(R
((s3/usr/lib/python2.7/dist-packages/bzrlib/commands.pyR{s
cC@sd|jd}x|jD]}|j}|ddkrQ|d d}nJ|ddkrvd|d d	}n%|dd
krd|d d}n||d7}qW|d }|S(
seReturn single-line grammar for this command.

        Only describes arguments, not options.
        sbzr t it$t+s...t?t[t]t*s...](R}R~(RFt
takes_argstupper(R
tstaname((s3/usr/lib/python2.7/dist-packages/bzrlib/commands.pyt_usages
cC@s|jrtjn|j}|r:|j|}ntd}|j|\}}}|jdr|jd}	n|j}	d}
|
td|f7}
|	j	ddkr|
td|	f7}
n|
td|	f7}
|
d7}
t
j|j}|j
}|rM|j	d	d
krM|jddd
}n|jdr|
td|tdf7}
n
|
|7}
|
d7}
|r5|jdr|jd}
dj|
j}
|
td|
f7}
n|rOx5|D]-}||kr|
d|||f7}
qqW|
d7}
qOn|
td|j7}
|jr|
td7}
|
dj|jd7}
n|j}|dk	r|
td|7}
n|j|}|r[|r7|r7g}xO|D]G}|dkr|j|qtdj||}|j|qW|}n|
tddj|d7}
n|rddl}|jj|
}
n|
S(sReturn a text string with help for this command.

        :param additional_see_also: Additional help topics to be
            cross-referenced.
        :param plain: if False, raw help (reStructuredText) is
            returned instead of plain text.
        :param see_also_as_links: if True, convert items in 'See also'
            list to internal links (used by bzr_man rstx generator)
        :param verbose: if True, display the full help, otherwise
            leave out the descriptive sections and just display
            usage help (e.g. Purpose, Usage, Options) with a
            message explaining how to obtain full help.
        sNo help for this command.tUsagets
:Purpose: %s
s
is:Usage:
%s
s
:Usage:   %s
s
  --1.14  is	 format:
s format::

isOptions:s:Options:%ssoptions:s
  s:Description:
  %s

s:%s:
%s
s0See bzr help %s for more details and examples.

s:Aliases:  s, s:From:     plugin "%s"
ttopicss:doc:`{0} <{1}-help>`s
:See also: %sN(tl10nti18ntinstallthelpRt_get_help_partsthas_keytpopRtfindtoptiont
get_optparsertoptionstformat_option_helpR6RtlenRtjoint
splitlinesRFR	R_tget_see_alsotappendtformattbzrlib.help_topicsthelp_topicsthelp_as_plain_text(R
tadditional_see_alsotplaintsee_also_as_linkstverbosetdoctpurposetsectionstordertusagetresulttparserRttexttlabelR_tsee_alsotsee_also_linkstitemt	link_textR?((s3/usr/lib/python2.7/dist-packages/bzrlib/commands.pyt
get_help_textst	

$


	

	$c	C@sHd}|jj}|jd}i}g}d
\}}x|D]}|jdr|jdrt|dkr||||||dd!d}}qI|d	k	rt|dkr|djr|||||d	|}}qIt|dkr|d|7}qI|}qIW||||||||fS(sSplit help text into a summary and named sections.

        :return: (summary,sections,order) where summary is the top line and
            sections is a dictionary of the rest indexed by section name.
            order is the order the section appear in the text.
            A section starts with a heading line of the form ":xxx:".
            Indented text on following lines is the section value.
            All text found outside a named section is assigned to the
            default section which is given the key of None.
        cS@sVt|dkrR|j|r8||cd|7<qR|j||||<ndS(Nis
(RRR(RRRtsection((s3/usr/lib/python2.7/dist-packages/bzrlib/commands.pytsave_sectionBs

iRt:iiis
N(NR(trstripRRRRtendswithRtisspace(	RRtlinestsummaryRRRRtline((s3/usr/lib/python2.7/dist-packages/bzrlib/commands.pyR6s$	
0/
cC@s
|jS(s*Return the commands help topic - its name.(RF(R
((s3/usr/lib/python2.7/dist-packages/bzrlib/commands.pytget_help_topic^scC@s8tt|dg}|r.|j|nt|S(sLReturn a list of help topics that are related to this command.

        The list is derived from the content of the _see_also attribute. Any
        duplicates are removed and the result is in lexical order.
        :param additional_terms: Additional help topics to cross-reference.
        :return: A list of help topics.
        t	_see_also(RNR`RHtsorted(R
tadditional_termsR((s3/usr/lib/python2.7/dist-packages/bzrlib/commands.pyRbscC@stjj}|j}xe|jD]Z}t|trMtjj|}n|||j	<|j	|kr%|j
j|j	q%q%W|S(sdReturn dict of valid options for this command.

        Maps from long option name to option object.(RtSTD_OPTIONStcopyR9t
takes_optionst
isinstancet
basestringRtOPTIONSRFRtR(R
REt	std_namesto((s3/usr/lib/python2.7/dist-packages/bzrlib/commands.pyRos
cC@stjjd|j|_dS(s:Return a file linked to stdout, which has proper encoding.t
encoding_typeN(tuit
ui_factorytmake_output_streamRtoutf(R
((s3/usr/lib/python2.7/dist-packages/bzrlib/commands.pyt_setup_outf}sc
C@st|||\}}|jd|krH|jj|jdSd|krt|jj|jdtdStjtj	d|j
krtj|d<n|jdr|d=nd|j
krtj
|d<n|jdr|d=nt|j|j|}i}x0|jD]"\}}|||jdd<q(W|j}	|	j|z|j|	SWdtjjd	d
tjktjdXdS(s@Parse the command line and run with extra aliases in alias_argv.RiRRtquietR4R5Ntdisplaytbytes(t
parse_argsRRtwriteRR1R#tset_verbosity_levelRt_verbosity_levelRtt
is_verboseRtis_quiett_match_argformRFRtitemsR6RRHtrunRRtlog_transport_activitytdebugtdebug_flags(
R
targvt
alias_argvRytoptstcmdargstcmdoptsR)tvtall_cmd_args((s3/usr/lib/python2.7/dist-packages/bzrlib/commands.pytrun_argv_aliasess8



c@s(jfd}|_dS(sDWrap the defined run method on self with a cleanup.

        This is called by __init__ to make the Command be able to be run
        by just calling run(), as it could be before cleanups were added.

        If a different form of cleanups are in use by your Command subclass,
        you can override this method.
        c@s{xtjdD]}|qWtj_zjj||SWd`xtjdD]}|qbWXdS(Ntpre_commandtpost_command(RORPtcleanuptOperationWithCleanupsRvt
run_simple(RyRzRS(t	class_runR
(s3/usr/lib/python2.7/dist-packages/bzrlib/commands.pyRsN(R(R
R((RR
s3/usr/lib/python2.7/dist-packages/bzrlib/commands.pyRus		
cC@std|jdS(sActually run the command.

        This is invoked with the options and arguments bound to
        keyword parameters.

        Return 0 or None if the command was successful, or a non-zero
        shell error code if not.  It's OK for this method to allow
        an exception to raise up.

        This method is automatically wrapped by Command.__init__ with a 
        cleanup operation, stored as self._operation. This can be used
        via self.add_cleanup to perform automatic cleanups at the end of
        run().

        The argument for run are assembled by introspection. So for instance,
        if your command takes an argument files, you would declare::

            def run(self, files=None):
                pass
        sno implementation of command %rN(tNotImplementedErrorRF(R
((s3/usr/lib/python2.7/dist-packages/bzrlib/commands.pyRscC@s0ddlm}|jtjkr&dS||S(s#Return help message for this class.i(tgetdocN(tinspectRRROR(R
R((s3/usr/lib/python2.7/dist-packages/bzrlib/commands.pyRscC@s
tj|S(sReturns the gettext function used to translate this command's help.

        Commands provided by plugins should override this to use their
        own i18n system.
        (Rtgettext_per_paragraph(R
tmessage((s3/usr/lib/python2.7/dist-packages/bzrlib/commands.pyRscC@st|jjS(sReturn the canonical name for this command.

        The name under which it was actually invoked is available in invoked_as.
        (Rt	__class__R(R
((s3/usr/lib/python2.7/dist-packages/bzrlib/commands.pyRFscC@sD|jjd}t|dkr<|ddkr<|dSdSdS(sGet the name of the plugin that provides this command.

        :return: The name of the plugin or None if the command is builtin.
        t.iitpluginsiN(RtsplitRR(R
t	mod_parts((s3/usr/lib/python2.7/dist-packages/bzrlib/commands.pyR_s"N(RRRR	RRRRR^tTrueRR1thiddenRRwR{RRR0RRRRRRRuRRRRFR_(((s3/usr/lib/python2.7/dist-packages/bzrlib/commands.pyROKs4?				s(	
		(					tCommandHookscB@seZdZdZRS(s5Hooks related to Command object creation/enumeration.cC@stj|dd|jddd|jddd|jd
dd|jdd
d|jddd|jddddS(sCreate the default hooks.

        These are all empty initially, because by default nothing should get
        notified.
        sbzrlib.commandss
Command.hooksR]sCalled after creating a command object to allow modifications such as adding or removing options, docs etc. Called with the new bzrlib.commands.Command object.ii
R[shCalled when creating a single command. Called with (cmd_or_None, command_name). get_command should either return the cmd_or_None parameter, or a replacement Command object that should be used for the command. Note that the Command.hooks hooks are core infrastructure. Many users will prefer to use bzrlib.commands.register_command or plugin_cmds.register_lazy.iR\sCalled when creating a single command if no command could be found. Called with (command_name). get_missing_command should either return None, or a Command object to be used for the command.RMsCalled when enumerating commands. Called with a set of cmd_name strings for all the commands found so far. This set  is safe to mutate - e.g. to remove a command. list_commands should return the updated set of command names.RsDCalled prior to executing a command. Called with the command object.iiRsACalled after executing a command. Called with the command object.N(ii
(ii(ii(ii(ii(ii(RRtadd_hook(R
((s3/usr/lib/python2.7/dist-packages/bzrlib/commands.pyRs&						(RRRR(((s3/usr/lib/python2.7/dist-packages/bzrlib/commands.pyRsc
C@stj|j}|dk	r.||}n|}y|j|\}}Wn(tk
rw}tjtdnXt	g|j
jD]*\}}|tjj
k	r||f^q}	||	fS(sParse command line.

    Arguments and options are parsed at this level before being passed
    down to specific command handlers.  This routine knows, from a
    lookup table, something about the available options, what optargs
    they take, and which commands will accept them.
    s$Only ASCII permitted in option namesN(RRRRRtUnicodeEncodeErrorRVRWRtdictRBRCtOptionParsert
DEFAULT_VALUE(
R
RRRRyRteR)RR((s3/usr/lib/python2.7/dist-packages/bzrlib/commands.pyR%s	
'cC@si}x|D]}|d }|ddkrL|r|jd||<qq
|ddkr|rz|||d<g}qd||d<q
|ddkr|stjtdj||jq|||d<g}q
|ddkrNt|d	kr/tjtdj||jn|d ||d<g|d*q
|}|stjtd
j||jq
|jd||<q
W|rtjtdj||dn|S(NiRiRt_listR~s#command {0!r} needs one or more {1}R}is#command {0!r} requires argument {1}s"extra argument to command {0}: {1}(RRRVRWRRRR(R'RRytargdicttaptargname((s3/usr/lib/python2.7/dist-packages/bzrlib/commands.pyRAsH

				
		c
O@std}|jdddd}tj|jtj|jzt|||SWdtjd|j}|j	dddt
d|XdS(NR#tcountiitshow_missingRtcoverdir(t
__import__tTraceR%tsettracetglobaltracet	threadingtexception_to_return_codeRtresultst
write_resultsR1(tdirnametthe_callableRyRzR#ttracerR
((s3/usr/lib/python2.7/dist-packages/bzrlib/commands.pytapply_coveragedps
c
O@sddl}ddl}ddl}|j\}}z}|j|}z"|jt|||pfd}Wd|jX|jj	|}	|	j
|	jd|	jd|SWdt
j|t
j|XdS(Nitcumi(thotshotttempfilet
hotshot.statstmkstemptProfiletruncallR	tclosetstatstloadt
strip_dirst
sort_statstprint_statstostremove(
R
RyRzRRtpffilenotpfnametproftretR((s3/usr/lib/python2.7/dist-packages/bzrlib/commands.pytapply_profileds"



cO@sy|||SWnrttfk
r}tj}tj|tj}tjj	drdGHddl
}|j|dn|SXdS(sUI level helper for profiling and coverage.

    This transforms exceptions into a return value of 3. As such its only
    relevant to the UI layer, and should never be called where catching
    exceptions may be desirable.
    tBZR_PDBs**** entering debuggeriNi(tKeyboardInterruptt	ExceptionR%texc_infoR#treport_exceptiontstderrRtenvironRtpdbtpost_mortem(R
RyRzRR'texitcodeR+((s3/usr/lib/python2.7/dist-packages/bzrlib/commands.pyR	scO@suddlm}|t|||\}}|j|dkrN|jn#|j|tjt	d||S(Ni(tprofilesProfile data written to "%s".(
t
bzrlib.lsprofR.R	tsortRtpprinttsaveR#tnoteR(tfilenameR
RyRzR.R"R((s3/usr/lib/python2.7/dist-packages/bzrlib/commands.pytapply_lsprofileds	


cC@sP|dkr*ddl}|jj}n|j|}|rLtj|SdS(sReturn an expanded alias, or None if no alias exists.

    cmd
        Command to be checked for an alias.
    config
        Used to specify an alternative config to use,
        which is especially useful for testing.
        If it is unspecified, the global config will be used.
    iN(Rt
bzrlib.configtconfigtGlobalConfigt	get_aliastcmdlineR(R'R7R?talias((s3/usr/lib/python2.7/dist-packages/bzrlib/commands.pyR9s

cC@stjdtjt|}tjd|t}}}}}}d}	}
g}d}g}
x|t|kr||}|dkrt}nP|dkrt}n;|dkrt}||d}	|d7}n|dkrt}n|d	krt}n|d
krt}n|dkr0t}n|dkr^||dt	j
d
<|d7}n|dkr||d}
|d7}ne|dkrnV|jdrtj
j|dn0|jdr|
j|dn
|j||d7}qiWtjdkrtj}ntjj}|j|
tj|sI|n||}|sstdjgdS|ddkrtdjgdSd}|st|d}|r|jd|d<qn|jd}t|d|}|r	t|_n|j}||g}ztj}dt_|rd|
rOtjdnt|	||}nU|r|
rtjdnt||}n'|
rt |
||}n||}|pdSWddtj
krtj!ddtn|t_|j"XdS(sExecute a command.

    :param argv: The command-line arguments, without the program name from
        argv[0] These should already be decoded. All library/test code calling
        run_bzr should be passing valid strings (don't need decoding).
    :param load_plugins: What function to call when triggering plugin loading.
        This function should take no arguments and cause all plugins to be
        loaded.
    :param disable_plugins: What function to call when disabling plugin
        loading. This function should take no arguments and cause all plugin
        loading to be prohibited (so that code paths in your application that
        know about some plugins possibly being present will fail to import
        those plugins even if they are installed.)
    :return: Returns a command exit code or raises an exception.

    Special master options: these must come before the command because
    they control how the command is interpreted.

    --no-plugins
        Do not load plugin modules at all

    --no-aliases
        Do not allow aliases

    --builtin
        Only use builtin commands.  (Plugins are still allowed to change
        other behaviour.)

    --profile
        Run under the Python hotshot profiler.

    --lsprof
        Run under the Python lsprof profiler.

    --coverage
        Generate line coverage report in the specified directory.

    --concurrency
        Specify the number of processes that can be run concurrently (selftest).
    sbazaar version: sbzr arguments: %ris	--profiles--lsprofs
--lsprof-fileis--no-pluginss--no-aliasess	--no-l10ns	--builtins
--concurrencytBZR_CONCURRENCYs
--coverages--profile-importss-Dis-ORs	--versiontversionRYs/--coverage ignored, because --lsprof is in use.s0--coverage ignored, because --profile is in use.NtmemorysProcess status after command:tshort(#R#tmutterR?t__version__t_specified_or_unicode_argvR1RRRRR*RRRtaddRtglobal_stateR7tCommandLineStoretcmdline_overridest
_from_cmdlinetset_debug_flags_from_configRZRR9RRRRR$R5R#Rtdebug_memoryt_reset(RRRt
opt_lsproftopt_profiletopt_no_pluginstopt_builtintopt_no_l10ntopt_no_aliasestopt_lsprof_filetopt_coverage_dirt	argv_copytitoverride_configR,RFRR'RoRtrun_argvtsaved_verbosity_levelR"((s3/usr/lib/python2.7/dist-packages/bzrlib/commands.pytrun_bzrs)

		
				





			

	c@sfd}|S(s0Decorator that suppresses pipe/interrupt errors.c@sy$||}tjj|SWntk
r}t|dddkrTn|jtjkrtjdks|jdtj	fkrqqnt
k
rnXdS(Nterrnotwin32i(R%tstdouttflushtIOErrorR`RRYtEPIPEtplatformtEINVALR%(RyRzRR(tfunc(s3/usr/lib/python2.7/dist-packages/bzrlib/commands.pytignore_pipeps
'	
((RaRb((Ras3/usr/lib/python2.7/dist-packages/bzrlib/commands.pytdisplay_commandnscC@sttjdkrdStjjdtdtjjdtdtjjdtdtjjdtdtjjdtddS(	s/Install the hooks to supply bzr's own commands.RMNsbzr commandsR[sbzr plugin commandssbzr external command lookupR\sbzr plugin-provider-db check(RLRORPtinstall_named_hookRkRrRpRg(((s3/usr/lib/python2.7/dist-packages/bzrlib/commands.pytinstall_bzr_command_hooksscC@s|dkrtjSg}yJxC|D];}t|trK|j|q&|j|jdq&WWn tk
rtj	dnX|SdS(Ntasciis'argv should be list of unicode strings.(
Rtosutilstget_unicode_argvRtunicodeRtdecodetUnicodeDecodeErrorRVtBzrError(Rtnew_argvR,((s3/usr/lib/python2.7/dist-packages/bzrlib/commands.pyRBs


cC@s@|dk	r|d}ntt|}tjd||S(sMain entry point of command-line interface.

    Typically `bzrlib.initialize` should be called first.

    :param argv: list of unicode command-line arguments similar to sys.argv.
        argv[0] is script name usually, it will be ignored.
        Don't pass here sys.argv because this list contains plain strings
        and not unicode; pass None instead.

    :return: exit code of bzr command.
    isreturn code %dN(RRAtrun_bzr_catch_errorsR#R@(RR"((s3/usr/lib/python2.7/dist-packages/bzrlib/commands.pytmains
cC@sttt|S(sRun a bzr command with parameters as described by argv.

    This function assumed that that UI layer is setup, that symbol deprecations
    are already applied, and that unicode decoding has already been performed on argv.
    (ReR	RX(R((s3/usr/lib/python2.7/dist-packages/bzrlib/commands.pyRnscC@swtyt|SWn[tk
rr}t|ttfsOt|dtrltj	t
jt
jdSnXdS(sRun bzr and report user errors, but let internal errors propagate.

    This is used for the test suite, and might be useful for other programs
    that want to wrap the commandline interface.
    tinternal_erroriN(
ReRXR&RtOSErrorR]R`RR#R(R%R'R)(RR((s3/usr/lib/python2.7/dist-packages/bzrlib/commands.pytrun_bzr_catch_user_errorsstHelpCommandIndexcB@s eZdZdZdZRS(s+A index for bzr help that returns commands.cC@s
d|_dS(Ns	commands/(tprefix(R
((s3/usr/lib/python2.7/dist-packages/bzrlib/commands.pyRscC@sd|r.|j|jr.|t|j}nyt|dt}Wntk
rXgSX|gSdS(sSearch for topic amongst commands.

        :param topic: A topic to search for.
        :return: A list which is either empty or contains a single
            Command entry.
        RaN(RRtRRUR1R!(R
ttopicR'((s3/usr/lib/python2.7/dist-packages/bzrlib/commands.pyt
get_topicss
(RRRRRv(((s3/usr/lib/python2.7/dist-packages/bzrlib/commands.pyRss	tProvidercB@seZdZdZRS(s(Generic class to be overriden by pluginscC@s
tdS(sTakes a command and returns the information for that plugin

        :return: A dictionary with all the available information
            for the requested plugin
        N(R(R
RX((s3/usr/lib/python2.7/dist-packages/bzrlib/commands.pyRis(RRRRi(((s3/usr/lib/python2.7/dist-packages/bzrlib/commands.pyRwstProvidersRegistrycB@seZdZdZRS(s6This registry exists to allow other providers to existcc@s&x|jD]\}}|Vq
WdS(N(RC(R
R/Rf((s3/usr/lib/python2.7/dist-packages/bzrlib/commands.pyt__iter__s(RRRRy(((s3/usr/lib/python2.7/dist-packages/bzrlib/commands.pyRxs(At
__future__RRR%tbzrlib.lazy_importRtglobalstbzrlib.hooksRtbzrlib.i18nRt
bzrlib.optionRt
bzrlib.pluginRRR?RtobjectRRRR2R8RR1R3R7RRAR;RLRTRIRJRRZRURgRbRkRpRrRORRPRRRRR#R	R5R9RXRcReRBRoRnRrRsRwRxRh(((s3/usr/lib/python2.7/dist-packages/bzrlib/commands.pyt<module>sj		
H							
					
	&	
				
(	/				
					

Copyright © 2017 || Recoded By Mr.Bumblebee