From d8433616fa94e1567e0548bb2aaf2617f4161978 Mon Sep 17 00:00:00 2001 From: Tooru Fujisawa Date: Tue, 28 Feb 2023 17:04:03 +0000 Subject: [PATCH] Bug 1815260 - Always use slash as path separator for mercurial command parameter in mach esmify command. r=Standard8 Differential Revision: https://phabricator.services.mozilla.com/D171211 --- tools/esmify/mach_commands.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tools/esmify/mach_commands.py b/tools/esmify/mach_commands.py index 59c0777a9ea7..16ea3ed99a8f 100644 --- a/tools/esmify/mach_commands.py +++ b/tools/esmify/mach_commands.py @@ -183,6 +183,9 @@ class HgUtils(VCSUtils): def find_jsms(self, path): jsms = [] + # NOTE: `set:glob:` syntax does not accept backslash on windows. + path = path_sep_from_native(path) + cmd = ["hg", "files", f'set:glob:"{path}/**/*.jsm"'] for line in self.run(cmd): jsm = pathlib.Path(line) @@ -206,6 +209,9 @@ class HgUtils(VCSUtils): def find_all_jss(self, path): jss = [] + # NOTE: `set:glob:` syntax does not accept backslash on windows. + path = path_sep_from_native(path) + cmd = [ "hg", "files",