From 797ed3cec86de926ecd6c045872843e56bb7cb00 Mon Sep 17 00:00:00 2001 From: Cosmin Sabou Date: Thu, 22 Aug 2019 11:57:23 +0300 Subject: [PATCH 1/2] Bug 1575774 - CLOBBER bump requested by glandium. a=clobber --HG-- extra : source : 620c55d58580bf3af2470c303be3ce6cde0b2f86 --- CLOBBER | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CLOBBER b/CLOBBER index d4cdfaff33de..1a5a89cb7d5f 100644 --- a/CLOBBER +++ b/CLOBBER @@ -22,4 +22,4 @@ # changes to stick? As of bug 928195, this shouldn't be necessary! Please # don't change CLOBBER for WebIDL changes any more. -Merge day clobber \ No newline at end of file +Bug 1575774 (caused by bug 844509) From 720d497cc2323e67175ad9893eeaab85f0557f71 Mon Sep 17 00:00:00 2001 From: Mike Hommey Date: Thu, 22 Aug 2019 23:58:00 +0300 Subject: [PATCH 2/2] Bug 1575959 - Restore the mozbuild.util.encode function. a=glandium Older config.status laying around in old trees are read by mach whenever it runs, including when running mach clobber. Those files still try to include mozbuild.util.encode, which is not here anymore. So we restore the function for now to unbreak those. Differential Revision: https://phabricator.services.mozilla.com//D43132 --HG-- extra : histedit_source : 3eb10cc8e18cc9094887061b00705afb6e705b54 --- python/mozbuild/mozbuild/util.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/python/mozbuild/mozbuild/util.py b/python/mozbuild/mozbuild/util.py index d11f95838b79..349c25c2b9ac 100644 --- a/python/mozbuild/mozbuild/util.py +++ b/python/mozbuild/mozbuild/util.py @@ -23,6 +23,7 @@ import sys import time from collections import ( + Iterable, OrderedDict, ) from io import ( @@ -1296,6 +1297,24 @@ def indented_repr(o, indent=4): return ''.join(recurse_indented_repr(o, 0)) +# Please do not use this function. It's only kept for backwards compatibility +# with older config.status files that may lay around before a CLOBBER. +def encode(obj, encoding='utf-8'): + '''Recursively encode unicode strings with the given encoding.''' + if isinstance(obj, dict): + return { + encode(k, encoding): encode(v, encoding) + for k, v in six.iteritems(obj) + } + if isinstance(obj, bytes): + return obj + if isinstance(obj, six.text_type): + return obj.encode(encoding) + if isinstance(obj, Iterable): + return [encode(i, encoding) for i in obj] + return obj + + def patch_main(): '''This is a hack to work around the fact that Windows multiprocessing needs to import the original main module, and assumes that it corresponds to a file