Skip to content

Commit 862178c

Browse files
committed
bazaar: Use lightweight checkouts rather than a full branch clone
Fixes pypa#5444
1 parent 35b1cc1 commit 862178c

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

news/5444.feature

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Use the much faster 'bzr co --lightweight' to obtain a copy of a Bazaar tree.

src/pip/_internal/vcs/bazaar.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,14 +58,15 @@ def fetch_new(self, dest, url, rev_options):
5858
rev_display,
5959
display_path(dest),
6060
)
61-
cmd_args = ['branch', '-q'] + rev_options.to_args() + [url, dest]
61+
cmd_args = (['checkout', '--lightweight', '-q'] +
62+
rev_options.to_args() + [url, dest])
6263
self.run_command(cmd_args)
6364

6465
def switch(self, dest, url, rev_options):
6566
self.run_command(['switch', url], cwd=dest)
6667

67-
def update(self, dest, url, rev_options):
68-
cmd_args = ['pull', '-q'] + rev_options.to_args()
68+
def update(self, dest, rev_options):
69+
cmd_args = ['update', '-q'] + rev_options.to_args()
6970
self.run_command(cmd_args, cwd=dest)
7071

7172
def get_url_rev_and_auth(self, url):

0 commit comments

Comments
 (0)