Bug 1427398 - building language packs shouldn't require all l10n changesets to be already public. r?gps draft
authorSebastian Hengst <archaeopteryx@coole-files.de>
Sat, 30 Dec 2017 01:31:35 +0100
changeset 714809 d6a13857015b085c2b6f6968ae39930c8e94267a
parent 714808 b98c074c0b729d4c52613cf2fad4e0c2d48d3a45
child 744686 c2ed82aa1ecfabb8df39431386cc932d1f5cead6
push id94034
push userarchaeopteryx@coole-files.de
push dateSat, 30 Dec 2017 00:33:11 +0000
reviewersgps
bugs1427398
milestone59.0a1
Bug 1427398 - building language packs shouldn't require all l10n changesets to be already public. r?gps MozReview-Commit-ID: 2zH9Ja9POLj
python/mozbuild/mozbuild/action/langpack_manifest.py
--- 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: