a Re) @sddlZddlmZmZmZddlmZmZddlm Z ddl m Z ddl m Z mZmZmZmZeeZGdddeZeedS) N)ListOptionalTuple) HiddenText display_path) make_command) path_to_url)AuthInfoRemoteNotFoundError RevOptionsVersionControlvcscseZdZdZdZdZdZeee edddZ ee e dd d d Z ee e dd d d Zee e dd ddZeeeeeeefdfdd ZeeedddZeeedddZeeeeedddZZS)Bazaarbzrz.bzrbranch)zbzr+httpz bzr+httpszbzr+sshzbzr+sftpzbzr+ftpzbzr+lpzbzr+file)revreturncCsd|gS)Nz-r)rrr/builddir/build/BUILDROOT/alt-python39-pip-21.3.1-2.el8.x86_64/opt/alt/python39/lib/python3.9/site-packages/pip/_internal/vcs/bazaar.pyget_base_rev_args szBazaar.get_base_rev_argsN)desturl rev_optionsrcCs>|}td||t|tdd|||}||dS)NzChecking out %s%s to %sr-q) to_displayloggerinforrto_args run_command)selfrrr rev_displaycmd_argsrrr fetch_new$szBazaar.fetch_newcCs|jtd||ddS)Nswitchcwd)rr)rrrrrrrr#/sz Bazaar.switchcCs"tdd|}|j||ddS)Npullrr$)rrr)rrrrr!rrrupdate2sz Bazaar.update)rrcs.t|\}}}|dr$d|}|||fS)Nzssh://zbzr+)superget_url_rev_and_auth startswith)clsrr user_pass __class__rrr)6s zBazaar.get_url_rev_and_auth)locationrcCsz|jdgdd|d}|D]T}|}dD]B}||r,||d}||rbt|S|Sq,qtdS)NrFT show_stdout stdout_onlyr%)zcheckout of branch: zparent branch: )r splitlinesstripr*split_is_local_repositoryrr )r+r/urlslinexreporrrget_remote_url>s    zBazaar.get_remote_urlcCs |jdgdd|d}|dS)NrevnoFTr0)rr4)r+r/revisionrrr get_revisionMszBazaar.get_revision)rnamercCsdS)z&Always assume the versions don't matchFr)r+rrArrris_commit_id_equalWszBazaar.is_commit_id_equal)__name__ __module__ __qualname__rAdirname repo_nameschemes staticmethodstrrrrr r"r#r' classmethodrrr r)r<r@boolrB __classcell__rrr-rrs"  $ r)loggingtypingrrrpip._internal.utils.miscrrpip._internal.utils.subprocessrpip._internal.utils.urlsr pip._internal.vcs.versioncontrolr r r r r getLoggerrCrrregisterrrrrs   K