File: //usr/lib/python2.7/dist-packages/hgext/largefiles/remotestore.pyc
ó
ÛXc @@ s d Z d d l m Z d d l m Z d d l m Z m Z m Z d d l m
Z
m Z m Z e j
Z
e j Z d e
j
f d „ ƒ YZ d S(
s4 remote largefile store; the base class for wirestorei ( t absolute_import( t _( t errort utilt wireprotoi ( t basestoret lfutilt
localstoret remotestorec B@ sq e Z d Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z
d „ Z d
„ Z d „ Z
RS( s) a largefile store accessed over a networkc C@ sA t t | ƒ j | | | ƒ t j | j | j | j ƒ | _ d S( N( t superR t __init__R t uit repot _lstore( t selfR R t url( ( s@ /usr/lib/python2.7/dist-packages/hgext/largefiles/remotestore.pyR
s c C@ sp | j | | ƒ r@ t j t d ƒ | t j | j ƒ f ƒ ‚ n | j j t d ƒ | t j | j ƒ f ƒ d S( Ns0 remotestore: could not put %s to remote store %ss' remotestore: put %s to remote store %s
( t sendfileR t AbortR R t hidepasswordR R t debug( R t sourcet hash( ( s@ /usr/lib/python2.7/dist-packages/hgext/largefiles/remotestore.pyt put! s c C@ s# t d „ | j | ƒ j ƒ Dƒ ƒ S( Nc s@ s' | ] \ } } | | d k f Vq d S( i N( ( t .0t ht s( ( s@ /usr/lib/python2.7/dist-packages/hgext/largefiles/remotestore.pys <genexpr>+ s ( t dictt _statt iteritems( R t hashes( ( s@ /usr/lib/python2.7/dist-packages/hgext/largefiles/remotestore.pyt exists* s c C@ s‹ | j j d | | f ƒ y2 t j | j | ƒ } | j | | ƒ SWd QXWn8 t k
r† } t j t d ƒ | t | ƒ f ƒ ‚ n Xd S( Ns remotestore: sendfile(%s, %s)
s' remotestore: could not open file %s: %s(
R R R t httpsendfilet _putt IOErrorR R R t str( R t filenameR t fdt e( ( s@ /usr/lib/python2.7/dist-packages/hgext/largefiles/remotestore.pyR . s c C@ sÍ y | j | ƒ } Wn§ t j k
rL } t j | | | j t | ƒ ƒ ‚ nq t j k
r‰ } t j d t
j | j ƒ | j f ƒ ‚ n4 t
k
r¼ } t j | | | j t | ƒ ƒ ‚ n Xt j | | ƒ S( Ns %s: %s( t _gett urlerrt httperrorR t
StoreErrorR R"