# HG changeset patch # User Frank-Rainer Grahl # Date 1655566933 -7200 # Parent fa156109e55f1d9ccaf7c080623005ff08b7c74e Bug 1774943 - Account for different vcs behaviour when getting source revision. r=IanN a=IanN gitlab, github, heptapod and mozilla hg all use/want different source urls. diff --git a/build/moz.configure/gecko_source.configure b/build/moz.configure/gecko_source.configure --- a/build/moz.configure/gecko_source.configure +++ b/build/moz.configure/gecko_source.configure @@ -52,17 +52,25 @@ def read_sourcestamp(repository): pass if len(lines) != 3: log.warn('sourcestamp.txt is corrupt!') return if lines and lines[line2read].startswith('http'): repo_line = ensure_text(lines[line2read]) - repo_url = repo_line.split('/rev/') + if "/tree/" in repo_line: + repo_url = repo_line.split('/tree/') + elif "/commit/" in repo_line: + repo_url = repo_line.split('/commit/') + elif "/commits/" in repo_line: + repo_url = repo_line.split('/commits/') + else: + repo_url = repo_line.split('/rev/') + return namespace(repo_url=repo_url[0], repo_rev=repo_url[1]) return get_sourcestamp @template def read_gecko_rev_yml(): def get_value(x):