Commit 40764b07 authored by Edward Lemur's avatar Edward Lemur Committed by Commit Bot

gclient: Report project url if it's a known project.

Bug: 832386
Change-Id: I98aba686f8d575def9a9050c77c057b1749e3235
Reviewed-on: https://chromium-review.googlesource.com/1141164Reviewed-by: 's avatarAaron Gable <agable@chromium.org>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
parent 807abf14
......@@ -105,6 +105,7 @@ import gclient_scm
import gclient_utils
import git_cache
import metrics
import metrics_utils
from third_party.repo.progress import Progress
import subcommand
import subprocess2
......@@ -1399,6 +1400,15 @@ it or fix the checkout.
except KeyError:
raise gclient_utils.Error('Invalid .gclient file. Solution is '
'incomplete: %s' % s)
metrics.collector.add(
'project_urls',
[
dep.url if not dep.url.endswith('.git') else dep.url[:-len('.git')]
for dep in deps_to_add
if dep.FuzzyMatchUrl(metrics_utils.KNOWN_PROJECT_URLS)
]
)
self.add_dependencies_and_close(deps_to_add, config_dict.get('hooks', []))
logging.info('SetConfig() done')
......
......@@ -26,6 +26,27 @@ NOTICE_FOOTER = (
'*****************************************************\n'
)
KNOWN_PROJECT_URLS = {
'https://chrome-internal.googlesource.com/chrome/ios_internal',
'https://chrome-internal.googlesource.com/infra/infra_internal',
'https://chromium.googlesource.com/breakpad/breakpad',
'https://chromium.googlesource.com/chromium/src',
'https://chromium.googlesource.com/chromium/tools/depot_tools',
'https://chromium.googlesource.com/crashpad/crashpad',
'https://chromium.googlesource.com/external/gyp',
'https://chromium.googlesource.com/external/naclports',
'https://chromium.googlesource.com/infra/goma/client',
'https://chromium.googlesource.com/infra/infra',
'https://chromium.googlesource.com/native_client/',
'https://chromium.googlesource.com/syzygy',
'https://chromium.googlesource.com/v8/v8',
'https://dart.googlesource.com/sdk',
'https://pdfium.googlesource.com/pdfium',
'https://skia.googlesource.com/buildbot',
'https://skia.googlesource.com/skia',
'https://webrtc.googlesource.com/src',
}
def get_python_version():
"""Return the python version in the major.minor.micro format."""
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment