Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(262)

Unified Diff: gclient_scm.py

Issue 18269002: Set core.deltaBaseCacheLimit on fetch-type operations in gclient. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gclient_scm.py
diff --git a/gclient_scm.py b/gclient_scm.py
index 3e8f59c9ba837fb02eea5a3974bb96183c11e250..5c3929a9639792e358a350e311b65a152664735e 100644
--- a/gclient_scm.py
+++ b/gclient_scm.py
@@ -243,7 +243,10 @@ class GitWrapper(SCMWrapper):
if not options.verbose:
quiet = ['--quiet']
self._UpdateBranchHeads(options, fetch=False)
- self._Run(['fetch', 'origin', '--prune'] + quiet, options)
+
+ fetch_cmd = [
+ '-c', 'core.deltaBaseCacheLimit=2g', 'fetch', 'origin', '--prune']
+ self._Run(fetch_cmd + quiet, options)
self._Run(['reset', '--hard', revision] + quiet, options)
self.UpdateSubmoduleConfig()
files = self._Capture(['ls-files']).splitlines()
@@ -362,7 +365,8 @@ class GitWrapper(SCMWrapper):
if not self._HasHead():
# Previous checkout was aborted before branches could be created in repo,
# so we need to reconstruct them here.
- self._Run(['pull', 'origin', 'master'], options)
+ self._Run(['-c', 'core.deltaBaseCacheLimit=2g', 'pull', 'origin',
+ 'master'], options)
self._FetchAndReset(revision, file_list, options)
cur_branch = self._GetCurrentBranch()
@@ -699,7 +703,7 @@ class GitWrapper(SCMWrapper):
# git clone doesn't seem to insert a newline properly before printing
# to stdout
print('')
- clone_cmd = ['clone', '--progress']
+ clone_cmd = ['-c', 'core.deltaBaseCacheLimit=2g', 'clone', '--progress']
if revision.startswith('refs/heads/'):
clone_cmd.extend(['-b', revision.replace('refs/heads/', '')])
detach_head = False
@@ -932,7 +936,7 @@ class GitWrapper(SCMWrapper):
'^\\+refs/branch-heads/\\*:.*$']
self._Run(config_cmd, options)
if fetch:
- fetch_cmd = ['fetch', 'origin']
+ fetch_cmd = ['-c', 'core.deltaBaseCacheLimit=2g', 'fetch', 'origin']
if options.verbose:
fetch_cmd.append('--verbose')
self._Run(fetch_cmd, options)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698