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

Unified Diff: client/third_party/infra_libs/event_mon/checkouts.py

Issue 2673613003: luci-py: Roll infra_libs. (Closed)
Patch Set: rolll Created 3 years, 11 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
Index: client/third_party/infra_libs/event_mon/checkouts.py
diff --git a/client/third_party/infra_libs/event_mon/checkouts.py b/client/third_party/infra_libs/event_mon/checkouts.py
index 36376afe73f4c925e9e14733fa59fbaae30e12f8..2b687809353e27dacbdbf3929c7a0a99fabdedaa 100644
--- a/client/third_party/infra_libs/event_mon/checkouts.py
+++ b/client/third_party/infra_libs/event_mon/checkouts.py
@@ -5,16 +5,7 @@
# Functions in this file relies on depot_tools been checked-out as a sibling
# of infra.git.
-import logging
-import os
import re
-import subprocess
-
-
-BASE_DIR = os.path.dirname(
- os.path.dirname(
- os.path.dirname(
- os.path.dirname(os.path.realpath(__file__)))))
def parse_revinfo(revinfo):
@@ -46,27 +37,3 @@ def parse_revinfo(revinfo):
url = url.strip()
revinfo_d[path] = {'source_url': url, 'revision': revision}
return revinfo_d
-
-
-def get_revinfo(cwd=None): # pragma: no cover
- """Call gclient to get the list of all revisions actually checked out on disk.
-
- gclient is expected to be under depot_tools/ sibling to infra/.
- If gclient can't be found or fail to run returns {}.
-
- Args:
- cwd (str): working directory where to run gclient. If None, use the
- current working directory.
- Returns:
- revinfo (dict): keys are local paths, values are dicts with keys:
- 'source_url' or 'revision'.
- """
-
- cmd = [os.path.join(BASE_DIR, 'depot_tools', 'gclient'), 'revinfo', '-a']
- logging.debug('Running: %s', ' '.join(cmd))
- revinfo = ''
- try:
- revinfo = subprocess.check_output(cmd, cwd=cwd)
- except (subprocess.CalledProcessError, OSError):
- logging.exception('Command failed to run: %s', ' '.join(cmd))
- return parse_revinfo(revinfo)
« no previous file with comments | « client/third_party/infra_libs/event_mon/__init__.py ('k') | client/third_party/infra_libs/ts_mon/common/interface.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698