From b1b5457a1483998fded899add32497d5fb7de943 Mon Sep 17 00:00:00 2001 From: "hinoka@google.com" Date: Wed, 16 Apr 2014 22:29:23 +0000 Subject: [PATCH] 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 --- gclient_scm.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/gclient_scm.py b/gclient_scm.py index e0a90912e7..79a0adf8f6 100644 --- a/gclient_scm.py +++ b/gclient_scm.py @@ -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()