Skip to content

Commit

Permalink
bazaar: Use lightweight checkouts rather than a full branch clone
Browse files Browse the repository at this point in the history
Fixes pypa#5444
  • Loading branch information
jelmer committed Jan 15, 2019
1 parent 35b1cc1 commit 862178c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions news/5444.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Use the much faster 'bzr co --lightweight' to obtain a copy of a Bazaar tree.
7 changes: 4 additions & 3 deletions src/pip/_internal/vcs/bazaar.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,15 @@ def fetch_new(self, dest, url, rev_options):
rev_display,
display_path(dest),
)
cmd_args = ['branch', '-q'] + rev_options.to_args() + [url, dest]
cmd_args = (['checkout', '--lightweight', '-q'] +
rev_options.to_args() + [url, dest])
self.run_command(cmd_args)

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

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

def get_url_rev_and_auth(self, url):
Expand Down

0 comments on commit 862178c

Please sign in to comment.