Bug 1427398 - building language packs shouldn't require all l10n changesets to be already public. r?gps
MozReview-Commit-ID: 2zH9Ja9POLj
--- a/python/mozbuild/mozbuild/action/langpack_manifest.py
+++ b/python/mozbuild/mozbuild/action/langpack_manifest.py
@@ -46,16 +46,19 @@ pushlog_api_url = "{0}/json-rev/{1}"
# (datetime) - a datetime object
#
# Example:
# dt = get_dt_from_hg("/var/vcs/l10n-central/pl")
# dt == datetime(2017, 10, 11, 23, 31, 54, 0)
###
def get_dt_from_hg(path):
with mozversioncontrol.get_repository_object(path=path) as repo:
+ phase = repo._run_in_client(["log", "-r", ".", "-T" "{phase}"])
+ if phase.strip() != "public":
+ return datetime.datetime.utcnow()
repo_url = repo._run_in_client(["paths", "default"])
repo_url = repo_url.strip().replace("ssh://", "https://")
repo_url = repo_url.replace("hg://", "https://")
cs = repo._run_in_client(["log", "-r", ".", "-T" "{node}"])
url = pushlog_api_url.format(repo_url, cs)
session = requests.Session()
try: