Commit b1b5457a authored by hinoka@google.com's avatar hinoka@google.com

branch heads fix

--with_branch_heads doesn't work with cache_dir, this fixes it.

BUG=

Review URL: https://codereview.chromium.org/239083007

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@264331 0039d316-1c4b-4281-b951-d872f2087c98
parent 3f23cdf5
......@@ -732,9 +732,14 @@ class GitWrapper(SCMWrapper):
"""
if not self.cache_dir:
return url
mirror_kwargs = { 'print_func': self.filter }
mirror_kwargs = {
'print_func': self.filter,
'refs': []
}
if url == CHROMIUM_SRC_URL or url + '.git' == CHROMIUM_SRC_URL:
mirror_kwargs['refs'] = ['refs/tags/lkgr', 'refs/tags/lkcr']
mirror_kwargs['refs'].extend(['refs/tags/lkgr', 'refs/tags/lkcr'])
if hasattr(options, 'with_branch_heads') and options.with_branch_heads:
mirror_kwargs['refs'].append('refs/branch-heads/*')
mirror = git_cache.Mirror(url, **mirror_kwargs)
mirror.populate(verbose=options.verbose, bootstrap=True)
mirror.unlock()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment