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

Unified Diff: gclient_scm.py

Issue 229683004: Get rid of UpdateSubmoduleConfig. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: rebase Created 6 years, 8 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 | tests/gclient_scm_test.py » ('j') | 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 cae5a8fa26f1e593373407d9ba495f9a6eadd8fa..e2a4cd77a28371c5e2e489971add6a4fbbb4d427 100644
--- a/gclient_scm.py
+++ b/gclient_scm.py
@@ -274,30 +274,6 @@ class GitWrapper(SCMWrapper):
cwd=self.checkout_path,
filter_fn=GitDiffFilterer(self.relpath).Filter, print_func=self.Print)
- def UpdateSubmoduleConfig(self):
- submod_cmd = ['git', 'config', '-f', '$toplevel/.git/config',
- 'submodule.$name.ignore', 'all']
- cmd = ['git', 'submodule', '--quiet', 'foreach', ' '.join(submod_cmd)]
- cmd2 = ['git', 'config', 'diff.ignoreSubmodules', 'all']
- cmd3 = ['git', 'config', 'branch.autosetupmerge']
jochen (gone - plz use gerrit) 2014/10/20 10:48:25 autosetupmerge wasn't really related to submodules
- cmd4 = ['git', 'config', 'fetch.recurseSubmodules', 'false']
- kwargs = {'cwd': self.checkout_path,
- 'print_stdout': False,
- 'filter_fn': lambda x: None}
- try:
- 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)
-
- gclient_utils.CheckCallAndFilter(cmd4, **kwargs)
-
def _FetchAndReset(self, revision, file_list, options):
"""Equivalent to git fetch; git reset."""
quiet = []
@@ -309,7 +285,6 @@ class GitWrapper(SCMWrapper):
fetch_cmd = cfg + ['fetch', self.remote, '--prune']
self._Run(fetch_cmd + quiet, options, retry=True)
self._Run(['reset', '--hard', revision] + quiet, options)
- self.UpdateSubmoduleConfig()
if file_list is not None:
files = self._Capture(['ls-files']).splitlines()
file_list.extend([os.path.join(self.checkout_path, f) for f in files])
@@ -380,7 +355,6 @@ class GitWrapper(SCMWrapper):
self._DeleteOrMove(options.force)
self._Clone(revision, url, options)
self._UpdateBranchHeads(options, fetch=True)
- self.UpdateSubmoduleConfig()
if file_list is not None:
files = self._Capture(['ls-files']).splitlines()
file_list.extend([os.path.join(self.checkout_path, f) for f in files])
@@ -392,7 +366,6 @@ class GitWrapper(SCMWrapper):
if not managed:
self._UpdateBranchHeads(options, fetch=False)
- self.UpdateSubmoduleConfig()
self.Print('________ unmanaged solution; skipping %s' % self.relpath)
return self._Capture(['rev-parse', '--verify', 'HEAD'])
@@ -588,7 +561,6 @@ class GitWrapper(SCMWrapper):
# whitespace between projects when syncing.
self.Print('')
- self.UpdateSubmoduleConfig()
if file_list is not None:
file_list.extend([os.path.join(self.checkout_path, f) for f in files])
« no previous file with comments | « no previous file | tests/gclient_scm_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698