Re/@s ddlmZddlZddlZddlmZddlmZm Z ddl m Z ddl m Z ddlmZddlmZmZe rdd lmZmZdd lmZdd lmZmZejeZGd d d eZejedS))absolute_importN)parse) display_pathrmtree) make_command)MYPY_CHECK_RUNNING) path_to_url)VersionControlvcs)OptionalTuple) HiddenText)AuthInfo RevOptionscseZdZdZdZdZdZfd d Zed d Z ddZ ddZ ddZ ddZ efddZeddZeddZeddZS)Bazaarbzrz.bzrbranchbzr+http bzr+httpsbzr+sshbzr+sftpbzr+ftpbzr+lpcsBtt|j||ttddr>tjjdgdS)N uses_fragmentlp)superr__init__getattr urllib_parserextend)selfargskwargs) __class__/builddir/build/BUILDROOT/alt-python35-pip-20.2.4-5.el8.x86_64/opt/alt/python35/lib/python3.5/site-packages/pip/_internal/vcs/bazaar.pyr#szBazaar.__init__cCs d|gS)Nz-rr$)revr$r$r%get_base_rev_args*szBazaar.get_base_rev_argscCsWtjj|rt||j|\}}|jtd|||jdS)zU Export the Bazaar repository at the url to the destination location exportN)ospathexistsrget_url_rev_options run_commandrto_args)r locationurl rev_optionsr$r$r%r(.s  z Bazaar.exportcCsW|j}tjd||t|tdd|j||}|j|dS)NzChecking out %s%s to %srz-q) to_displayloggerinforrr.r-)r destr0r1 rev_displaycmd_argsr$r$r% fetch_new<s  zBazaar.fetch_newcCs |jtd|d|dS)Nswitchcwd)r-r)r r5r0r1r$r$r%r9Jsz Bazaar.switchcCs/tdd|j}|j|d|dS)Npullz-qr:)rr.r-)r r5r0r1r7r$r$r%updateNsz Bazaar.updatecsGtt|j|\}}}|jdr:d|}|||fS)Nzssh://zbzr+)rrget_url_rev_and_auth startswith)clsr0r& user_pass)r#r$r%r=Ss! zBazaar.get_url_rev_and_authcCs|jdgd|}xp|jD]b}|j}xMdD]E}|j|r>|j|d}|j|rt|S|Sq>Wq%WdS)Nr4r:checkout of branch: parent branch: )rArB)r- splitlinesstripr>split_is_local_repositoryr)r?r/urlslinexrepor$r$r%get_remote_url\s    zBazaar.get_remote_urlcCs&|jdgd|}|jdS)Nrevnor:rC)r-rD)r?r/revisionr$r$r% get_revisionjszBazaar.get_revisioncCsdS)z&Always assume the versions don't matchFr$)r?r5namer$r$r%is_commit_id_equalqszBazaar.is_commit_id_equal)rrrrrrr)__name__ __module__ __qualname__rQdirname repo_nameschemesr staticmethodr'r(r8r9r< classmethodr=rLrPrRr$r$)r#r%rs      r) __future__rloggingr)Zpip._vendor.six.moves.urllibrrpip._internal.utils.miscrrpip._internal.utils.subprocessrpip._internal.utils.typingrpip._internal.utils.urlsr pip._internal.vcs.versioncontrolr r typingr r r rr getLoggerrSr3rregisterr$r$r$r%s  ]