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

Unified Diff: gclient_scm.py

Issue 10758011: Set default for branch.autosetupmerge. This avoids problems with git-cl-upload (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools/
Patch Set: Created 8 years, 5 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
===================================================================
--- gclient_scm.py (revision 145703)
+++ gclient_scm.py (working copy)
@@ -201,17 +201,21 @@
'submodule.$name.ignore', 'all']
cmd = ['git', 'submodule', '--quiet', 'foreach', ' '.join(submod_cmd)]
cmd2 = ['git', 'config', 'diff.ignoreSubmodules', 'all']
+ cmd3 = ['git', 'config', 'branch.autosetupmerge']
+ kwargs = {'cwd': self.checkout_path,
+ 'print_stdout': False,
+ 'filter_fn': lambda x: None}
try:
- gclient_utils.CheckCallAndFilter(
- cmd, cwd=self.checkout_path, print_stdout=False,
- filter_fn=lambda x: None)
- gclient_utils.CheckCallAndFilter(
- cmd2, cwd=self.checkout_path, print_stdout=False,
- filter_fn=lambda x: None)
+ gclient_utils.CheckCallAndFilter(cmd, **kwargs)
+ gclient_utils.CheckCallAndFilter(cmd2, **kwargs)
except subprocess2.CalledProcessError:
# Not a fatal error, or even very interesting in a non-git-submodule
# world. So just keep it quiet.
pass
+ try:
+ gclient_utils.CheckCallAndFilter(cmd3, **kwargs)
+ except subprocess2.CalledProcessError:
+ gclient_utils.CheckCallAndFilter(cmd3 + ['always'], **kwargs)
def update(self, options, args, file_list):
"""Runs git to update or transparently checkout the working copy.
« 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