File: //usr/lib/python2.7/dist-packages/mercurial/streamclone.pyc
ó
ÛXc @@ sÔ d d l m Z d d l Z d d l Z d d l m Z d d l m Z m Z m Z m
Z
e d „ Z d „ Z
d „ Z d „ Z d
„ Z d „ Z d d
„ Z d „ Z d „ Z d „ Z d e f d „ ƒ YZ d S( i ( t absolute_importNi ( t _( t branchmapt errort storet utilc C@ sA | j } | j } t } | j rH d | j j d g ƒ k rH t } qH n | r^ | r^ t d f St | ƒ rt t d f S| j r‡ t d f S| j
} | d k r® | j d ƒ } n | s¾ t d f St ƒ } | j d ƒ ræ | j
d ƒ nQ | j d ƒ } | st d f St | j d ƒ ƒ } | | j r1t d f S| } t | f S( s÷ Whether it is possible to perform a streaming clone as part of pull.
``bailifbundle2supported`` will cause the function to return False if
bundle2 stream clones are supported. It should only be called by the
legacy stream clone code path.
Returns a tuple of (supported, requirements). ``supported`` is True if
streaming clone is supported and False otherwise. ``requirements`` is
a set of repo requirements from the remote, or ``None`` if stream clone
isn't supported.
t v1t streams stream-preferredt revlogv1t
streamreqst ,N( t repot remotet Falset
canusebundle2t remotebundle2capst gett Truet Nonet lent headst streamclonerequestedt capablet sett addt splitt supportedformats( t pullopt bailifbundle2supportedR R t bundle2supportedt streamrequestedt requirementsR ( ( s9 /usr/lib/python2.7/dist-packages/mercurial/streamclone.pyt canperformstreamclone s8
c C@ s t | ƒ \ } } | s d S| j } | j } d } | j d ƒ rR | j ƒ } n | j j t d ƒ ƒ | j ƒ } | j
ƒ } y t | ƒ } Wn) t k
r» t
j t d ƒ | ƒ ‚ n X| d k rà t
j t d ƒ ƒ ‚ nH | d k rt
j t d ƒ ƒ ‚ n$ | d k r(t
j t d
ƒ ƒ ‚ n | j
ƒ } y% t t | j d d ƒ ƒ \ } }
Wn/ t t f k
rŠt
j t d ƒ | ƒ ‚ n X| j ƒ f t | | | |
ƒ | | j | j B| _ | j ƒ | j ƒ | rït j | | ƒ n | j ƒ Wd QXd S( sð Possibly perform a legacy stream clone operation.
Legacy stream clones are performed as part of pull but before all other
operations.
A legacy stream clone will not be performed if a bundle2 stream clone is
supported.
NR s streaming all changes
s' unexpected response from remote server:i s operation forbidden by serveri s$ locking the remote repository failedi s% the server sent an unknown error codet ( R R R R R R t uit statusR t
stream_outt readlinet intt
ValueErrorR t
ResponseErrort Abortt mapR t TypeErrort lockt consumev1R R t _applyopenerreqst _writerequirementst replacecachet
invalidate( R t supportedR R R t
rbranchmapt fpt lt respt filecountt bytecount( ( s9 /usr/lib/python2.7/dist-packages/mercurial/streamclone.pyt maybeperformlegacystreamclone^ sJ
%
c C@ s | j d d t d t ƒS( s5 Whether streaming clones are allowed from the server.t servert uncompressedt untrusted( t
configboolR ( R"