commit dafe95fde09b6dab25fa54b947b8b4aaee62e847
parent 483db3e9eb36cf023d34f8c86095854767000854
Author: Michael Froman <mjfroman@mac.com>
Date: Wed, 17 Dec 2025 18:33:47 +0000
Bug 2001715 - move check_repo_status from restore_patch_stack.py to run_operations.py for reuse. r=dbaker DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D275113
Diffstat:
2 files changed, 11 insertions(+), 12 deletions(-)
diff --git a/dom/media/webrtc/third_party_build/restore_patch_stack.py b/dom/media/webrtc/third_party_build/restore_patch_stack.py
@@ -10,11 +10,10 @@ from pathlib import Path
from fetch_github_repo import fetch_repo
from run_operations import (
- RepoType,
+ check_repo_status,
detect_repo_type,
get_last_line,
run_git,
- run_hg,
run_shell,
)
@@ -25,16 +24,6 @@ from run_operations import (
# process from the beginning.
-def check_repo_status(repo_type):
- if not isinstance(repo_type, RepoType):
- print("check_repo_status requires type RepoType")
- raise TypeError
- if repo_type == RepoType.GIT:
- return run_git("git status -s third_party/libwebrtc", ".")
- else:
- return run_hg("hg status third_party/libwebrtc")
-
-
def restore_patch_stack(
github_path,
github_branch,
diff --git a/dom/media/webrtc/third_party_build/run_operations.py b/dom/media/webrtc/third_party_build/run_operations.py
@@ -112,3 +112,13 @@ def detect_repo_type():
elif os.path.exists(".hg"):
return RepoType.HG
return None
+
+
+def check_repo_status(repo_type):
+ if not isinstance(repo_type, RepoType):
+ print("check_repo_status requires type RepoType")
+ raise TypeError
+ if repo_type == RepoType.GIT:
+ return run_git("git status -s third_party/libwebrtc", ".")
+ else:
+ return run_hg("hg status third_party/libwebrtc")