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

Side by Side Diff: client/third_party/infra_libs/event_mon/checkouts.py

Issue 2465423002: Roll infra_libs to 564aaf7480f24c90687df79d9cef910cc342a54d (Closed)
Patch Set: update readmes Created 4 years, 1 month 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 unified diff | Download patch
OLDNEW
1 # Copyright 2015 The Chromium Authors. All rights reserved. 1 # Copyright 2015 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 # Functions in this file relies on depot_tools been checked-out as a sibling 5 # Functions in this file relies on depot_tools been checked-out as a sibling
6 # of infra.git. 6 # of infra.git.
7 7
8 import logging 8 import logging
9 import os 9 import os
10 import re 10 import re
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 """Call gclient to get the list of all revisions actually checked out on disk. 52 """Call gclient to get the list of all revisions actually checked out on disk.
53 53
54 gclient is expected to be under depot_tools/ sibling to infra/. 54 gclient is expected to be under depot_tools/ sibling to infra/.
55 If gclient can't be found or fail to run returns {}. 55 If gclient can't be found or fail to run returns {}.
56 56
57 Args: 57 Args:
58 cwd (str): working directory where to run gclient. If None, use the 58 cwd (str): working directory where to run gclient. If None, use the
59 current working directory. 59 current working directory.
60 Returns: 60 Returns:
61 revinfo (dict): keys are local paths, values are dicts with keys: 61 revinfo (dict): keys are local paths, values are dicts with keys:
62 'source_url' or 'revision'. The latter can be a git SHA1 or an svn 62 'source_url' or 'revision'.
63 revision.
64 """ 63 """
65 64
66 cmd = [os.path.join(BASE_DIR, 'depot_tools', 'gclient'), 'revinfo', '-a'] 65 cmd = [os.path.join(BASE_DIR, 'depot_tools', 'gclient'), 'revinfo', '-a']
67 logging.debug('Running: %s', ' '.join(cmd)) 66 logging.debug('Running: %s', ' '.join(cmd))
68 revinfo = '' 67 revinfo = ''
69 try: 68 try:
70 revinfo = subprocess.check_output(cmd, cwd=cwd) 69 revinfo = subprocess.check_output(cmd, cwd=cwd)
71 except (subprocess.CalledProcessError, OSError): 70 except (subprocess.CalledProcessError, OSError):
72 logging.exception('Command failed to run: %s', ' '.join(cmd)) 71 logging.exception('Command failed to run: %s', ' '.join(cmd))
73 return parse_revinfo(revinfo) 72 return parse_revinfo(revinfo)
OLDNEW
« no previous file with comments | « client/third_party/infra_libs/_command_line_stub.py ('k') | client/third_party/infra_libs/event_mon/monitoring.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698