commit 38299d916b45949bd269c87adf6d306b5b9b7f58 parent b4cdb44b3319bb39b5d70c1902961c7d5a532d6d Author: Michael Froman <mjfroman@mac.com> Date: Wed, 17 Dec 2025 18:33:49 +0000 Bug 1800925 - add git support to fast-forward-libwebrtc.sh r=dbaker DONTBUILD Differential Revision: https://phabricator.services.mozilla.com/D275810 Diffstat:
| M | dom/media/webrtc/third_party_build/fast-forward-libwebrtc.sh | | | 27 | ++++++++++++++++++++++----- |
1 file changed, 22 insertions(+), 5 deletions(-)
diff --git a/dom/media/webrtc/third_party_build/fast-forward-libwebrtc.sh b/dom/media/webrtc/third_party_build/fast-forward-libwebrtc.sh @@ -48,14 +48,27 @@ if [ "x$GIT_IS_REBASING" != "x0" ]; then exit 1 fi +find_repo_type +echo "repo type: $MOZ_REPO" + if [ "x$RESUME" = "x" ]; then SKIP_TO="run" # Check for modified files and abort if present. - MODIFIED_FILES=`hg status --exclude "third_party/libwebrtc/**.orig" third_party/libwebrtc` + if [ "x$MOZ_REPO" = "xgit" ]; then + MODIFIED_FILES=`git status --porcelain third_party/libwebrtc` + else + MODIFIED_FILES=`hg status --exclude "third_party/libwebrtc/**.orig" third_party/libwebrtc` + fi if [ "x$MODIFIED_FILES" = "x" ]; then - # Completely clean the mercurial checkout before proceeding - hg update -C -r . - hg purge + # Completely clean the checkout before proceeding + if [ "x$MOZ_REPO" = "xgit" ]; then + git restore --staged :/ + git restore :/ + git clean -fd + else + hg update -C -r . + hg purge + fi else echo "There are modified files in the checkout. Cowardly aborting!" echo "$MODIFIED_FILES" @@ -63,7 +76,11 @@ if [ "x$RESUME" = "x" ]; then fi else SKIP_TO=$RESUME - hg revert -C third_party/libwebrtc/README.mozilla.last-vendor &> /dev/null + if [ "x$MOZ_REPO" = "xgit" ]; then + git restore third_party/libwebrtc/README.mozilla.last-vendor &> /dev/null + else + hg revert -C third_party/libwebrtc/README.mozilla.last-vendor &> /dev/null + fi fi find_base_commit