--- a/clang-format/build.sh Wed Sep 16 22:48:28 2020 -0500
+++ b/clang-format/build.sh Thu Sep 24 01:20:42 2020 -0500
@@ -23,6 +23,11 @@
ninja -C ${BUILD_DIR} clang-format
-[ -n $(hg id -T '{dirty}') ] && exit 1
+# if hg id -T returns a + it means the tree is dirty so revert it and exit 1 +DIRTY=$(hg id -T '{dirty}' 2>/dev/null) +if [ -n "${DIRTY}" ] ; then + hg revert -C --all 2>/dev/null