Воркед
This commit is contained in:
1 parent
ac32c55ab9
commit
ee94d8e529
1138 files changed
+55771
-77901
No files matched your search
@@ -44,24 +44,35 @@ class Bazaar(VersionControl):
|
||||
display_path(dest),
|
||||
)
|
||||
if verbosity <= 0:
|
||||
flag = "--quiet"
|
||||
flags = ["--quiet"]
|
||||
elif verbosity == 1:
|
||||
flag = ""
|
||||
flags = []
|
||||
else:
|
||||
flag = f"-{'v'*verbosity}"
|
||||
cmd_args = make_command("branch", flag, rev_options.to_args(), url, dest)
|
||||
flags = [f"-{'v'*verbosity}"]
|
||||
cmd_args = make_command(
|
||||
"checkout", "--lightweight", *flags, rev_options.to_args(), url, dest
|
||||
)
|
||||
self.run_command(cmd_args)
|
||||
|
||||
def switch(self, dest: str, url: HiddenText, rev_options: RevOptions) -> None:
|
||||
self.run_command(make_command("switch", url), cwd=dest)
|
||||
|
||||
def update(self, dest: str, url: HiddenText, rev_options: RevOptions) -> None:
|
||||
cmd_args = make_command("pull", "-q", rev_options.to_args())
|
||||
output = self.run_command(
|
||||
make_command("info"), show_stdout=False, stdout_only=True, cwd=dest
|
||||
)
|
||||
if output.startswith("Standalone "):
|
||||
# Older versions of pip used to create standalone branches.
|
||||
# Convert the standalone branch to a checkout by calling "bzr bind".
|
||||
cmd_args = make_command("bind", "-q", url)
|
||||
self.run_command(cmd_args, cwd=dest)
|
||||
|
||||
cmd_args = make_command("update", "-q", rev_options.to_args())
|
||||
self.run_command(cmd_args, cwd=dest)
|
||||
|
||||
@classmethod
|
||||
def get_url_rev_and_auth(cls, url: str) -> Tuple[str, Optional[str], AuthInfo]:
|
||||
# hotfix the URL scheme after removing bzr+ from bzr+ssh:// readd it
|
||||
# hotfix the URL scheme after removing bzr+ from bzr+ssh:// re-add it
|
||||
url, rev, user_pass = super().get_url_rev_and_auth(url)
|
||||
if url.startswith("ssh://"):
|
||||
url = "bzr+" + url
|
||||
|
||||
Reference in new issue
Block a user