mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-26 20:30:41 +00:00
Bug 1826562 - Output hg diff output when verify-devtools-bundle fails. r=jdescottes.
We exclude module-manifest.json from the diff as we already ignore it when checking modified file. We take this opportunity to use the proper exclude option from hg Differential Revision: https://phabricator.services.mozilla.com/D174763
This commit is contained in:
parent
22d0f39eef
commit
755d53fc77
@ -22,9 +22,13 @@ import json
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
# Ignore module-manifest.json updates which can randomly happen when
|
||||
# building bundles.
|
||||
hg_exclude = "devtools/client/debugger/bin/module-manifest.json"
|
||||
|
||||
print("Run `hg status devtools/`")
|
||||
status = (
|
||||
subprocess.check_output(["hg", "status", "-n", "devtools/"])
|
||||
subprocess.check_output(["hg", "status", "-n", "devtools/", "-X", hg_exclude])
|
||||
.decode("utf-8")
|
||||
.split("\n")
|
||||
)
|
||||
@ -39,11 +43,6 @@ for l in status:
|
||||
# Ignore empty lines
|
||||
continue
|
||||
|
||||
if "module-manifest.json" in l:
|
||||
# Ignore module-manifest.json updates which can randomly happen when
|
||||
# building bundles.
|
||||
continue
|
||||
|
||||
failures[l] = [
|
||||
{
|
||||
"path": l,
|
||||
@ -56,6 +55,11 @@ for l in status:
|
||||
}
|
||||
]
|
||||
|
||||
|
||||
diff = subprocess.check_output(["hg", "diff", "devtools/", "-X", hg_exclude]).decode(
|
||||
"utf-8"
|
||||
)
|
||||
|
||||
# Revert all the changes created by `node bin/bundle.js`
|
||||
subprocess.check_output(["hg", "revert", "-C", "devtools/"])
|
||||
|
||||
@ -76,4 +80,6 @@ if len(failures) > 0:
|
||||
for failure in failures:
|
||||
print(failure)
|
||||
|
||||
print(f"diff:{diff}")
|
||||
|
||||
sys.exit(1)
|
||||
|
Loading…
x
Reference in New Issue
Block a user