1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
U
H=®d/ã@sÄddlmZddlZddlZddlmZddlmZm    Z    ddl
m Z ddl m Z ddlmZddlmZmZe rœdd    lmZmZdd
lmZdd lmZmZe e¡ZGd d „d eƒZe e¡dS)é)Úabsolute_importN)Úparse)Ú display_pathÚrmtree)Ú make_command)ÚMYPY_CHECK_RUNNING)Ú path_to_url)ÚVersionControlÚvcs)ÚOptionalÚTuple)Ú
HiddenText)ÚAuthInfoÚ
RevOptionscsŒeZdZdZdZdZdZ‡fdd„Zedd„ƒZ    d    d
„Z
d d „Z d d„Z dd„Z e‡fdd„ƒZedd„ƒZedd„ƒZedd„ƒZ‡ZS)ÚBazaarÚbzrz.bzrÚbranch)rzbzr+httpz    bzr+httpszbzr+sshzbzr+sftpzbzr+ftpzbzr+lpcs0tt|ƒj||Žttddƒr,tj dg¡dS)NÚ uses_fragmentÚlp)ÚsuperrÚ__init__ÚgetattrÚ urllib_parserÚextend)ÚselfÚargsÚkwargs©Ú    __class__©úOD:\z\workplace\VsCode\pyvenv\venv\Lib\site-packages\pip/_internal/vcs/bazaar.pyr#s zBazaar.__init__cCsd|gS)Nz-rr)Úrevrrr Úget_base_rev_args*szBazaar.get_base_rev_argscCs>tj |¡rt|ƒ| |¡\}}| td||| ¡ƒ¡dS)zU
        Export the Bazaar repository at the url to the destination location
        ÚexportN)ÚosÚpathÚexistsrÚget_url_rev_optionsÚ run_commandrÚto_args)rÚlocationÚurlÚ rev_optionsrrr r#.s  ÿz Bazaar.exportcCs>| ¡}t d||t|ƒ¡tdd| ¡||ƒ}| |¡dS)NzChecking out %s%s to %srú-q)Ú
to_displayÚloggerÚinforrr)r()rÚdestr+r,Ú rev_displayÚcmd_argsrrr Ú    fetch_new<süÿzBazaar.fetch_newcCs|jtd|ƒ|ddS)NÚswitch©Úcwd)r(r)rr1r+r,rrr r5Jsz Bazaar.switchcCs"tdd| ¡ƒ}|j||ddS)NÚpullr-r6)rr)r()rr1r+r,r3rrr ÚupdateNsz Bazaar.updatecs2tt|ƒ |¡\}}}| d¡r(d|}|||fS)Nzssh://zbzr+)rrÚget_url_rev_and_authÚ
startswith)Úclsr+r!Ú    user_passrrr r:Ss
zBazaar.get_url_rev_and_authcCsr|jdg|d}| ¡D]T}| ¡}dD]B}| |¡r(| |¡d}| |¡r^t|ƒS|Sq(qdS)Nr0r6)zcheckout of branch: zparent branch: é)r(Ú
splitlinesÚstripr;ÚsplitÚ_is_local_repositoryr)r<r*ÚurlsÚlineÚxÚreporrr Úget_remote_url\s 
 
zBazaar.get_remote_urlcCs|jdg|d}| ¡dS)NÚrevnor6éÿÿÿÿ)r(r?)r<r*Úrevisionrrr Ú get_revisionjs
ÿzBazaar.get_revisioncCsdS)z&Always assume the versions don't matchFr)r<r1Únamerrr Úis_commit_id_equalqszBazaar.is_commit_id_equal)Ú__name__Ú
__module__Ú __qualname__rLÚdirnameÚ    repo_nameÚschemesrÚ staticmethodr"r#r4r5r9Ú classmethodr:rGrKrMÚ __classcell__rrrr rs& 
 
 
r)Ú
__future__rÚloggingr$Zpip._vendor.six.moves.urllibrrÚpip._internal.utils.miscrrÚpip._internal.utils.subprocessrÚpip._internal.utils.typingrÚpip._internal.utils.urlsrÚ pip._internal.vcs.versioncontrolr    r
Útypingr r r rrÚ    getLoggerrNr/rÚregisterrrrr Ú<module>s      
]