-=[ Mr. Bumblebee ]=-
_Indonesia_
ó
º£Pc @@ se d Z d d l m Z d g Z d d l Z d d l m Z e e ƒ d ƒ d e f d „ ƒ YZ d S( s9 The core state needed to make use of bzr is managed here.i ( t absolute_importt BzrLibraryStateN( t lazy_importsl
from bzrlib import (
cleanup,
config,
osutils,
symbol_versioning,
trace,
ui,
)
c B@ s2 e Z d Z d „ Z d „ Z d „ Z d „ Z RS( s+ The state about how bzrlib has been configured.
This is the core state needed to make use of bzr. The current instance is
currently always exposed as bzrlib.global_state, but we desired to move
to a point where no global state is needed at all.
:ivar saved_state: The bzrlib.global_state at the time __enter__ was
called.
:ivar cleanups: An ObjectWithCleanups which can be used for cleanups that
should occur when the use of bzrlib is completed. This is initialised
in __enter__ and executed in __exit__.
c C@ s7 | | _ | | _ t j ƒ | _ i | _ t | _ d S( sE Create library start for normal use of bzrlib.
Most applications that embed bzrlib, including bzr itself, should just
call bzrlib.initialize(), but it is possible to use the state class
directly. The initialize() function provides sensible defaults for a
CLI program, such as a text UI factory.
More options may be added in future so callers should use named
arguments.
BzrLibraryState implements the Python 2.5 Context Manager protocol
PEP343, and can be used with the with statement. Upon __enter__ the
global variables in use by bzr are set, and they are cleared on
__exit__.
:param ui: A bzrlib.ui.ui_factory to use.
:param trace: A bzrlib.trace.Config context manager to use, perhaps
bzrlib.trace.DefaultConfig.
N( t _uit _tracet configt CommandLineStoret cmdline_overridest
config_storest Falset started( t selft uit trace( ( s8 /usr/lib/python2.7/dist-packages/bzrlib/library_state.pyt __init__6 s
c C@ s | j s | j ƒ n | S( N( R
t _start( R ( ( s8 /usr/lib/python2.7/dist-packages/bzrlib/library_state.pyt __enter__S s
c C@ s› t j ƒ | _ t j d d k rA | j j t j d t ƒ ƒ n | j j
ƒ t j j | _
| j t j _ | j j
ƒ t j | _ | t _ t | _ d S( s Do all initialization.i t finalt overrideN( t cleanupt ObjectWithCleanupst cleanupst bzrlibt version_infot add_cleanupt symbol_versioningt suppress_deprecation_warningst TrueR R R t
ui_factoryt _orig_uiR t global_statet saved_stateR
( R ( ( s8 /usr/lib/python2.7/dist-packages/bzrlib/library_state.pyR X s
c C@ s¬ | d k r9 x* | j j ƒ D] \ } } | j ƒ q Wn | j j ƒ t j ƒ t j ƒ t j
ƒ | j j d d d ƒ | j
j d d d ƒ | j t _ | j t _ t S( N( t NoneR t iteritemst save_changesR t cleanup_nowR
t _flush_stdout_stderrt _flush_tracet osutilst report_extension_load_failuresR t __exit__R R R R R R R R ( R t exc_typet exc_valt exc_tbt kt store( ( s8 /usr/lib/python2.7/dist-packages/bzrlib/library_state.pyR( n s
( t __name__t
__module__t __doc__R R R R( ( ( ( s8 /usr/lib/python2.7/dist-packages/bzrlib/library_state.pyR ( s
(
R0 t
__future__R t __all__R t bzrlib.lazy_importR t globalst objectR ( ( ( s8 /usr/lib/python2.7/dist-packages/bzrlib/library_state.pyt <module> s
Copyright © 2017 || Recoded By Mr.Bumblebee