tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit 8523a0d729bd3c5d7e475b8641d0885bc99649e2
parent 38299d916b45949bd269c87adf6d306b5b9b7f58
Author: Michael Froman <mjfroman@mac.com>
Date:   Wed, 17 Dec 2025 18:33:49 +0000

Bug 1800925 - add git support to loop-ff.sh r=dbaker DONTBUILD

Differential Revision: https://phabricator.services.mozilla.com/D275811

Diffstat:
Mdom/media/webrtc/third_party_build/loop-ff.sh | 36+++++++++++++++++++++++++++++-------
1 file changed, 29 insertions(+), 7 deletions(-)

diff --git a/dom/media/webrtc/third_party_build/loop-ff.sh b/dom/media/webrtc/third_party_build/loop-ff.sh @@ -59,12 +59,19 @@ HANDLE_NOOP_COMMIT="" # * o pipefail: All stages of all pipes should succeed. set -eEuo pipefail +find_repo_type +echo "repo type: $MOZ_REPO" + # start a new log with every run of this script rm -f $LOOP_OUTPUT_LOG # make sure third_party/libwebrtc/README.mozilla.last-vendor is the committed version # so we properly determine MOZ_LIBWEBRTC_BASE and MOZ_LIBWEBRTC_NEXT_BASE # in the loop below -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 # check for a resume situation from fast-forward-libwebrtc.sh RESUME_FILE=$STATE_DIR/fast_forward.resume @@ -161,9 +168,15 @@ fi echo_log "Moving from moz-libwebrtc commit $MOZ_LIBWEBRTC_BASE to $MOZ_LIBWEBRTC_NEXT_BASE" bash $SCRIPT_DIR/fast-forward-libwebrtc.sh 2>&1| tee -a $LOOP_OUTPUT_LOG -MOZ_CHANGED=`hg diff -c tip --stat \ - | egrep -ve "README.mozilla.last-vendor|README.mozilla|files changed," \ - | wc -l | tr -d " " || true` +if [ "x$MOZ_REPO" == "xgit" ]; then + MOZ_CHANGED=`git show --format='' --name-status \ + | grep -E -ve "README.mozilla.last-vendor|README.mozilla" \ + | wc -l | tr -d " " || true` +else + MOZ_CHANGED=`hg diff -c tip --stat \ + | grep -E -ve "README.mozilla.last-vendor|README.mozilla|files changed," \ + | wc -l | tr -d " " || true` +fi GIT_CHANGED=`./mach python $SCRIPT_DIR/filter_git_changes.py \ --repo-path $MOZ_LIBWEBRTC_SRC --commit-sha $MOZ_LIBWEBRTC_NEXT_BASE \ | wc -l | tr -d " "` @@ -239,8 +252,13 @@ if [ "x$MODIFIED_BUILD_RELATED_FILE_CNT" != "x0" ]; then ./mach python build/gn_processor.py \ $SCRIPT_DIR/gn-configs/webrtc.json 2>&1| tee -a $LOOP_OUTPUT_LOG - MOZ_BUILD_CHANGE_CNT=`hg status third_party/libwebrtc \ - --include 'third_party/libwebrtc/**moz.build' | wc -l | tr -d " "` + if [ "x$MOZ_REPO" == "xgit" ]; then + MOZ_BUILD_CHANGE_CNT=`git status --porcelain 'third_party/libwebrtc/**moz.build' \ + | wc -l | tr -d " "` + else + MOZ_BUILD_CHANGE_CNT=`hg status third_party/libwebrtc \ + --include 'third_party/libwebrtc/**moz.build' | wc -l | tr -d " "` + fi if [ "x$MOZ_BUILD_CHANGE_CNT" != "x0" ]; then echo_log "Detected modified moz.build files, commiting" bash $SCRIPT_DIR/commit-build-file-changes.sh 2>&1| tee -a $LOOP_OUTPUT_LOG @@ -265,6 +283,10 @@ ERROR_HELP="" # If we've committed moz.build changes, spin up try builds. if [ "x$MOZ_BUILD_CHANGE_CNT" != "x0" ]; then TRY_FUZZY_QUERY_STRING="^build-" + PUSH_TO_VCS="--push-to-vcs" + if [ "x$MOZ_REPO" == "xgit" ]; then + PUSH_TO_VCS="" + fi CURRENT_TIME=`date` echo_log "Detected modified moz.build files, starting try builds with" echo_log "'$TRY_FUZZY_QUERY_STRING' at $CURRENT_TIME" @@ -275,7 +297,7 @@ if [ "x$MOZ_BUILD_CHANGE_CNT" != "x0" ]; then # Show the time used for this command, and don't let it fail if the # command times out so the script continues running. This command # can take quite long, occasionally 10min. - (time ./mach try fuzzy --push-to-vcs --full -q $TRY_FUZZY_QUERY_STRING) 2>&1| tee -a $LOOP_OUTPUT_LOG || true + (time ./mach try fuzzy $PUSH_TO_VCS --full -q $TRY_FUZZY_QUERY_STRING) 2>&1| tee -a $LOOP_OUTPUT_LOG || true fi if [ ! "x$MOZ_STOP_AFTER_COMMIT" = "x" ]; then