-=[ Mr. Bumblebee ]=-
_Indonesia_
σ
ξ:οNc @@ sΝ d Z d d l m Z d d l m Z m Z m Z m Z d d l m Z m
Z
d d l m Z d d l
m Z d e f d YZ d e e d Z e e d
Z e e d Z d Z d d
Z d S( s bzr upgrade logic.i ( t absolute_import( t errorst tracet uit urlutils( t
ControlDirt format_registry( t gettext( t RemoteBzrDirt Convertc B@ s, e Z d d d d Z d Z d Z RS( c C@ s | | _ d } | t j j k } | d k rH | d k rH t d n | d k r` | | _ n t j | | _ t | j t
r£ | j j | j j | _ n | j j
j rΑ t j n | j j
| _ t j j j | z | j Wd | st j j j | n Xd S( s² Convert a Bazaar control directory to a given format.
Either the url or control_dir parameter must be given.
:param url: the URL of the control directory or None if the
control_dir is explicitly given instead
:param format: the format to convert to or None for the default
:param control_dir: the control directory or None if it is
specified via the URL parameter instead
t cross_format_fetchs4 either the url or control_dir parameter must be set.N( t formatR t
ui_factoryt suppressed_warningst Nonet AssertionErrort bzrdirR t open_unsupportedt
isinstanceR t _ensure_realt _real_bzrdirt root_transportt is_readonlyR t UpgradeReadonlyt transportt addt convertt remove( t selft urlR t control_dirt
warning_idt
saved_warning( ( s2 /usr/lib/python2.7/dist-packages/bzrlib/upgrade.pyt __init__% s(
c C@ sώ yW | j j } | j | j j k rS t j j t d t j | j d n ~ Wn t j
t j f k
rv n X| j d k rγ y | j j j j } Wn t j k
r» t } n X| rΛ d } n d } t j | } n | j } | j j | st j | j j n | j j sGt j t d | j j n | j j | t j j t d t j | j j d | j j \ | _ | _ xC | j j | rγ| j j j | } | j | j d | _ q‘Wt j j t d d S( NsD This is a checkout. The branch (%s) needs to be upgraded separately.s utf-8s default-rich-roott defaults$ cannot upgrade from bzrdir format %ss starting upgrade of %st finished(! R t open_brancht user_urlR R t noteR R t unescape_for_displayR t NotBranchErrort IncompatibleRepositoriesR R t find_repositoryt _formatt rich_root_datat NoRepositoryPresentt FalseR t make_bzrdirt needs_format_conversiont UpToDateFormatt can_convert_formatt BzrErrort check_conversion_targetR t baset
backup_bzrdirt backup_oldpatht backup_newpatht
get_converterR ( R t brancht rich_roott format_nameR t converter( ( s2 /usr/lib/python2.7/dist-packages/bzrlib/upgrade.pyR H sB
c C@ s` | j } | j | j } t j j } | j t d z | j | Wd | j Xd S( sU Clean-up after a conversion.
This removes the backup.bzr directory.
s Deleting backup.bzrN(
R t relpathR8 R R t nested_progress_bart updateR t delete_treeR# ( R R t backup_relpatht child_pb( ( s2 /usr/lib/python2.7/dist-packages/bzrlib/upgrade.pyt clean_upp s N( t __name__t
__module__R R! R RD ( ( ( s2 /usr/lib/python2.7/dist-packages/bzrlib/upgrade.pyR # s # (c C@ s t j | g } t | | d | d | \ } } } t | d k r t | } t | } | | }
t j j t d j | | |
n | S( sν Upgrade locations to format.
This routine wraps the smart_upgrade() routine with a nicer UI.
In particular, it ensures all URLs can be opened before starting
and reports a summary at the end if more than one upgrade was attempted.
This routine is useful for command line tools. Other bzrlib clients
probably ought to use smart_upgrade() instead.
:param url: a URL of the locations to upgrade.
:param format: the format to convert to or None for the best default
:param clean-up: if True, the backup.bzr directory is removed if the
upgrade succeeded for a given repo/branch/tree
:param dry_run: show what would happen but don't actually do any upgrades
:return: the list of exceptions encountered
RD t dry_runi s;
SUMMARY: {0} upgrades attempted, {1} succeeded, {2} failed( R R t
smart_upgradet lenR R R&