zmc
2023-08-08 e792e9a60d958b93aef96050644f369feb25d61b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
U
H=®do0ã@süddlmZddlZddlZddlZddlmZddlmZm    Z    m
Z
m Z ddl m Z ddlmZddlmZmZe d¡Ze d    ¡Ze d
¡Ze d ¡ZerÔdd lmZmZdd l mZddlmZddlmZmZe e ¡Z!Gdd„deƒZ"e #e"¡dS)é)Úabsolute_importN)Ú
indent_log)Ú display_pathÚis_console_interactiveÚrmtreeÚsplit_auth_from_netloc)Ú make_command)ÚMYPY_CHECK_RUNNING)ÚVersionControlÚvcsz url="([^"]+)"zcommitted-rev="(\d+)"z\s*revision="(\d+)"z<url>(.*)</url>)ÚOptionalÚTuple)Ú CommandArgs)Ú
HiddenText)ÚAuthInfoÚ
RevOptionscsÚeZdZdZdZdZdZedd„ƒZe    dd„ƒZ
ed    d
„ƒZ e‡fd d „ƒZ e‡fd d„ƒZ e    dd„ƒZedd„ƒZedd„ƒZedd„ƒZd(‡fdd„    Zdd„Zdd„Zdd„Zd d!„Zd"d#„Zd$d%„Zd&d'„Z‡ZS))Ú
SubversionÚsvnz.svnÚcheckout)rzsvn+sshzsvn+httpz    svn+httpszsvn+svncCsdS)NT©)ÚclsÚ
remote_urlrrúSD:\z\workplace\VsCode\pyvenv\venv\Lib\site-packages\pip/_internal/vcs/subversion.pyÚshould_add_vcs_url_prefix+sz$Subversion.should_add_vcs_url_prefixcCsd|gS)Nz-rr)ÚrevrrrÚget_base_rev_args/szSubversion.get_base_rev_argsc    Cs¨d}t |¡D]”\}}}|j|kr0g|dd…<q| |j¡tj ||jd¡}tj |¡s\q| |¡\}}||kr||d}n|rŠ| |¡s˜g|dd…<qt    ||ƒ}q|S)zR
        Return the maximum revision for all files under a given location
        rNÚentriesú/)
ÚosÚwalkÚdirnameÚremoveÚpathÚjoinÚexistsÚ_get_svn_url_revÚ
startswithÚmax)    rÚlocationÚrevisionÚbaseÚdirsÚ_Ú
entries_fnÚdirurlÚlocalrevrrrÚ get_revision3s"
 
  zSubversion.get_revisioncs"|dkrtt|ƒ ||¡St|ƒS)z™
        This override allows the auth information to be passed to svn via the
        --username and --password options instead of via the URL.
        Ússh)ÚsuperrÚget_netloc_and_authr)rÚnetlocÚscheme©Ú    __class__rrr3OszSubversion.get_netloc_and_authcs2tt|ƒ |¡\}}}| d¡r(d|}|||fS)Nzssh://zsvn+)r2rÚget_url_rev_and_authr&)rÚurlrÚ    user_passr6rrr8\s
zSubversion.get_url_rev_and_authcCs(g}|r|d|g7}|r$|d|g7}|S)Nz
--usernamez
--passwordr)ÚusernameÚpasswordÚ
extra_argsrrrÚ make_rev_argses   zSubversion.make_rev_argscCsR|}tj tj |d¡¡sD|}tj |¡}||krt d|¡dSq| |¡dS)Nzsetup.pyzGCould not find setup.py for directory %s (tried all parent directories)r)rr"r$r#r ÚloggerÚwarningr%)rr(Ú orig_locationÚ last_locationrrrÚget_remote_urlps ýzSubversion.get_remote_urlc     Csrddlm}tj ||jd¡}tj |¡rHt|ƒ}| ¡}W5QRXnd}|     d¡sj|     d¡sj|     d¡r¬t
t t j | d¡ƒƒ}|dd=|dd    }d
d „|Dƒdg}nª|     d ¡rüt |¡}|sÖtd jftƒŽƒ‚| d¡}dd „t |¡Dƒdg}nZz8| dd|g¡}    t |    ¡ d¡}dd „t |    ¡Dƒ}Wn |k
rTdg}}YnX|rft|ƒ}
nd}
||
fS)Nr)ÚSubProcessErrorrÚÚ8Ú9Ú10z
 
écSs,g|]$}t|ƒdkr|drt|dƒ‘qS)é    )ÚlenÚint)Ú.0ÚdrrrÚ
<listcomp>–s z/Subversion._get_svn_url_rev.<locals>.<listcomp>z<?xmlzBadly formatted data: {data!r}écSsg|]}t| d¡ƒ‘qS©rP©rLÚgroup©rMÚmrrrrOsÚinfoz--xmlcSsg|]}t| d¡ƒ‘qSrQrRrTrrrrOªs)Úpip._internal.exceptionsrDrr"r#r r$ÚopenÚreadr&ÚlistÚmapÚstrÚ
splitlinesÚsplitÚ_svn_xml_url_reÚsearchÚ
ValueErrorÚformatÚlocalsrSÚ _svn_rev_reÚfinditerÚ run_commandÚ_svn_info_xml_url_reÚ_svn_info_xml_rev_rer') rr(rDÚ entries_pathÚfÚdatar9ÚrevsÚmatchÚxmlrrrrr%…sJ  
 
ÿþ
 
 
 ÿ
ÿÿ
 
zSubversion._get_svn_url_revcCsdS)z&Always assume the versions don't matchFr)rÚdestÚnamerrrÚis_commit_id_equal·szSubversion.is_commit_id_equalNcs,|dkrtƒ}||_d|_tt|ƒ ¡dS)N)rÚuse_interactiveÚ _vcs_versionr2rÚ__init__)Úselfrrr6rrrt¼s
zSubversion.__init__cCsxd}| dg¡}| |¡sdS|t|ƒd… ¡d}| d¡d d¡}zttt|ƒƒ}Wntk
rrYdSX|S)aQuery the version of the currently installed Subversion client.
 
        :return: A tuple containing the parts of the version information or
            ``()`` if the version returned from ``svn`` could not be parsed.
        :raises: BadCommand: If ``svn`` is not installed.
        z svn, version z    --versionrNrú-Ú.)    rfr&rKr^Ú    partitionÚtupler[rLra)ruÚversion_prefixÚversionÚ version_listÚparsed_versionrrrÚcall_vcs_versionËs 
zSubversion.call_vcs_versioncCs"|jdk    r|jS| ¡}||_|S)aReturn the version of the currently installed Subversion client.
 
        If the version of the Subversion client has already been queried,
        a cached value will be used.
 
        :return: A tuple containing the parts of the version information or
            ``()`` if the version returned from ``svn`` could not be parsed.
        :raises: BadCommand: If ``svn`` is not installed.
        N)rsr~)ruÚ vcs_versionrrrÚget_vcs_versionés
 
zSubversion.get_vcs_versioncCs&|js dgS| ¡}|dkr"dgSgS)aXReturn options to be used on calls to Subversion that contact the server.
 
        These options are applicable for the following ``svn`` subcommands used
        in this class.
 
            - checkout
            - export
            - switch
            - update
 
        :return: A list of command line arguments to pass to ``svn``.
        z--non-interactive)rPéz--force-interactive)rrr€)ruÚ svn_versionrrrÚget_remote_call_optionsþs     z"Subversion.get_remote_call_optionsc    Csh| |¡\}}t d||¡tƒ<tj |¡r8t|ƒtd|     ¡| 
¡||ƒ}|  |¡W5QRXdS)z@Export the svn repository at the url to the destination locationz!Exporting svn repository %s to %sÚexportN) Úget_url_rev_optionsr?rVrrr"r$rrrƒÚto_argsrf)rur(r9Ú rev_optionsÚcmd_argsrrrr„s þzSubversion.exportcCsD| ¡}t d||t|ƒ¡tdd| ¡| ¡||ƒ}| |¡dS)NzChecking out %s%s to %srz-q)Ú
to_displayr?rVrrrƒr†rf)ruror9r‡Ú rev_displayrˆrrrÚ    fetch_new0s üþzSubversion.fetch_newcCs&td| ¡| ¡||ƒ}| |¡dS)NÚswitch©rrƒr†rf©ruror9r‡rˆrrrrŒ?sþzSubversion.switchcCs$td| ¡| ¡|ƒ}| |¡dS)NÚupdaterrŽrrrrGsþzSubversion.update)N)Ú__name__Ú
__module__Ú __qualname__rpr Ú    repo_nameÚschemesÚ classmethodrÚ staticmethodrr0r3r8r>rCr%rqrtr~r€rƒr„r‹rŒrÚ __classcell__rrr6rr%s<
 
 
 
 
 
 
1
!r)$Ú
__future__rÚloggingrÚreÚpip._internal.utils.loggingrÚpip._internal.utils.miscrrrrÚpip._internal.utils.subprocessrÚpip._internal.utils.typingr    Ú pip._internal.vcs.versioncontrolr
r Úcompiler_rdrhrgÚtypingr r rrrrÚ    getLoggerrr?rÚregisterrrrrÚ<module>s,    
 
 
 
 
-