No bug: Don't generate trailing whitespace in `l10n-changesets.json`; r=aki
authorTom Prince <mozilla@hocat.ca>
Mon, 04 Jun 2018 18:04:39 +0000
changeset 486674 9d21ea9afe7a61cfe80d577809bf3191e816baec
parent 486673 66c2aec021c7eb2a5c6a37d8f64fcee84b5621b6
child 486675 8cfb5c70e0ed8e88bde99a0408397e1eebcdd5f0
push id9719
push userffxbld-merge
push dateFri, 24 Aug 2018 17:49:46 +0000
treeherdermozilla-beta@719ec98fba77 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersaki
milestone63.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
No bug: Don't generate trailing whitespace in `l10n-changesets.json`; r=aki Differential Revision: https://phabricator.services.mozilla.com/D1536
testing/mozharness/scripts/l10n_bumper.py
--- a/testing/mozharness/scripts/l10n_bumper.py
+++ b/testing/mozharness/scripts/l10n_bumper.py
@@ -272,17 +272,20 @@ class L10nBumper(VCSScript):
             if new_contents == old_contents:
                 continue
             # super basic sanity check
             if not isinstance(new_contents, dict) or len(new_contents) < 5:
                 self.error("Cowardly refusing to land a broken-seeming changesets file!")
                 continue
 
             # Write to disk
-            content_string = json.dumps(new_contents, sort_keys=True, indent=4)
+            content_string = json.dumps(
+                new_contents, sort_keys=True, indent=4,
+                separators=(',', ': '),
+            )
             fh = codecs.open(path, encoding='utf-8', mode='w+')
             fh.write(content_string + "\n")
             fh.close()
 
             locale_map = self._build_locale_map(old_contents, new_contents)
 
             # Commit
             message = self.build_commit_message(bump_config['name'],