Bug 1245953 - Fail fast if no VCS info defined; r=garndt
Before, we attempted to build and query a URL that potentially had "None" in it. This printed some wonky messages in the log and may have contributed to added latency due to the HTTP request that was doomed to fail. MozReview-Commit-ID: JrR5PK33vCn
This commit is contained in:
@@ -149,6 +149,10 @@ def query_vcs_info(repository, revision):
|
||||
This is intended to be used on hg.mozilla.org/mozilla-central and
|
||||
similar. It may or may not work for other hg repositories.
|
||||
"""
|
||||
if not repository or not revision:
|
||||
sys.stderr.write('cannot query vcs info because vcs info not provided\n')
|
||||
return None
|
||||
|
||||
PushInfo = namedtuple('PushInfo', ['pushid', 'pushdate'])
|
||||
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user