Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: ensure_dependencies.py

Issue 29452663: Issue 4906 - change cloning in ensure_dependecies (Closed)
Patch Set: Created May 31, 2017, 2:57 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 2
3 # This Source Code Form is subject to the terms of the Mozilla Public 3 # This Source Code Form is subject to the terms of the Mozilla Public
4 # License, v. 2.0. If a copy of the MPL was not distributed with this 4 # License, v. 2.0. If a copy of the MPL was not distributed with this
5 # file, You can obtain one at http://mozilla.org/MPL/2.0/. 5 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
6 6
7 import sys 7 import sys
8 import os 8 import os
9 import posixpath 9 import posixpath
10 import re 10 import re
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 if level == 0: 295 if level == 0:
296 logging.warning('No dependencies file in directory %s, nothing to do ...\n%s' % (repodir, USAGE)) 296 logging.warning('No dependencies file in directory %s, nothing to do ...\n%s' % (repodir, USAGE))
297 return 297 return
298 if level >= 10: 298 if level >= 10:
299 logging.warning('Too much subrepository nesting, ignoring %s' % repo) 299 logging.warning('Too much subrepository nesting, ignoring %s' % repo)
300 return 300 return
301 301
302 if overrideroots is not None: 302 if overrideroots is not None:
303 config['_root'] = overrideroots 303 config['_root'] = overrideroots
304 304
305 for dir, sources in config.iteritems(): 305 for dir, sources in sorted(config.iteritems()):
306 if (dir.startswith('_') or 306 if (dir.startswith('_') or
307 skipdependencies.intersection([s[0] for s in sources if s[0]])): 307 skipdependencies.intersection([s[0] for s in sources if s[0]])):
308 continue 308 continue
309 309
310 target = safe_join(repodir, dir) 310 target = safe_join(repodir, dir)
311 parenttype = get_repo_type(repodir) 311 parenttype = get_repo_type(repodir)
312 _root = config.get('_root', {}) 312 _root = config.get('_root', {})
313 313
314 for key in sources.keys() + _root.keys(): 314 for key in sources.keys() + _root.keys():
315 if key == parenttype or key is None and vcs != '*': 315 if key == parenttype or key is None and vcs != '*':
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
371 args = parser.parse_args() 371 args = parser.parse_args()
372 372
373 if args.quiet: 373 if args.quiet:
374 logging.disable(logging.INFO) 374 logging.disable(logging.INFO)
375 375
376 repos = args.repos 376 repos = args.repos
377 if not len(repos): 377 if not len(repos):
378 repos = [os.path.dirname(__file__)] 378 repos = [os.path.dirname(__file__)]
379 for repo in repos: 379 for repo in repos:
380 resolve_deps(repo) 380 resolve_deps(repo)
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld