diff --git a/patches/bootstrap.patch b/patches/bootstrap.patch index bb4a351..0856351 100644 --- a/patches/bootstrap.patch +++ b/patches/bootstrap.patch @@ -39,93 +39,15 @@ # put the kinds into a graph and sort topologically so that kinds are loaded --- a/third_party/python/taskcluster_taskgraph/taskgraph/parameters.py +++ b/third_party/python/taskcluster_taskgraph/taskgraph/parameters.py -@@ -78,50 +78,80 @@ - - - def _get_defaults(repo_root=None): - repo_path = repo_root or os.getcwd() - repo = get_repository(repo_path) -- try: -- repo_url = repo.get_url() -- parsed_url = mozilla_repo_urls.parse(repo_url) -- project = parsed_url.repo_name -- except ( -- CalledProcessError, -- mozilla_repo_urls.errors.InvalidRepoUrlError, -- mozilla_repo_urls.errors.UnsupportedPlatformError, -- ): -- repo_url = "" -- project = "" -+ if repo: -+ try: -+ repo_url = repo.get_url() -+ parsed_url = mozilla_repo_urls.parse(repo_url) -+ project = parsed_url.repo_name -+ except ( -+ CalledProcessError, -+ mozilla_repo_urls.errors.InvalidRepoUrlError, -+ mozilla_repo_urls.errors.UnsupportedPlatformError, -+ ): -+ repo_url = "" -+ project = "" - -- return { -- "base_repository": repo_url, -- "base_ref": "", -- "base_rev": "", -- "build_date": int(time.time()), -- "build_number": 1, -- "do_not_optimize": [], -- "enable_always_target": True, -- "existing_tasks": {}, -- "filters": ["target_tasks_method"], -- "head_ref": repo.branch or repo.head_rev, -- "head_repository": repo_url, -- "head_rev": repo.head_rev, -- "head_tag": "", -- "level": "3", -- "moz_build_date": datetime.now().strftime("%Y%m%d%H%M%S"), -- "next_version": None, -- "optimize_strategies": None, -- "optimize_target_tasks": True, -- "owner": "nobody@mozilla.com", -- "project": project, -- "pushdate": int(time.time()), -- "pushlog_id": "0", -- "repository_type": repo.tool, -- "target_tasks_method": "default", -- "tasks_for": "", -- "version": get_version(repo_path), -- } -+ return { -+ "base_repository": repo_url, -+ "base_ref": "", -+ "base_rev": "", -+ "build_date": int(time.time()), -+ "build_number": 1, -+ "do_not_optimize": [], -+ "enable_always_target": True, -+ "existing_tasks": {}, -+ "filters": ["target_tasks_method"], -+ "head_ref": repo.branch or repo.head_rev, -+ "head_repository": repo_url, -+ "head_rev": repo.head_rev, -+ "head_tag": "", -+ "level": "3", -+ "moz_build_date": datetime.now().strftime("%Y%m%d%H%M%S"), -+ "next_version": None, -+ "optimize_strategies": None, -+ "optimize_target_tasks": True, -+ "owner": "nobody@mozilla.com", -+ "project": project, -+ "pushdate": int(time.time()), -+ "pushlog_id": "0", -+ "repository_type": repo.tool, -+ "target_tasks_method": "default", -+ "tasks_for": "", -+ "version": get_version(repo_path), -+ } -+ else: +@@ -83,9 +83,36 @@ def _get_defaults(repo_root=None): + try: + repo = get_repository(repo_path) + except RuntimeError: +- # Use fake values if no repo is detected. +- repo = Mock(branch="", head_rev="", tool="git") +- repo.get_url.return_value = "" ++ # patches/bootstrap.patch - return our object from here, but ++ # it's possible the mock object would have sufficed. + return { + "base_repository": "SOURCE", + "base_ref": "", @@ -155,10 +77,8 @@ + "version": "", + } - - defaults_functions = [_get_defaults] - - + try: + repo_url = repo.get_url() @@ -193,17 +223,18 @@ return os.path.splitext(os.path.basename(spec))[0] diff --git a/patches/ui-patches/firefox-view.patch b/patches/ui-patches/firefox-view.patch index 8024360..cd39498 100644 --- a/patches/ui-patches/firefox-view.patch +++ b/patches/ui-patches/firefox-view.patch @@ -1,4 +1,4 @@ -# LibreWolf firefox-view.patch +x# LibreWolf firefox-view.patch # # Author: Malte Jürgens # Description: Hide "Firefox View" by default and make it work with LibreWolf @@ -23,7 +23,7 @@ - { - callout.showFeatureCallout(); - }; +@@ -2,7 +2,28 @@ + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ ++ +function onPrefChange() { + document.getElementById("tab-pickup-container").hidden = + Services.prefs.getBoolPref("identity.fxaccounts.enabled") && @@ -113,12 +116,13 @@ + "librewolf.firefoxView.hideColorways", + "identity.fxaccounts.enabled", +].forEach((pref) => Services.prefs.addObserver(pref, onPrefChange)); ++ + window.addEventListener("DOMContentLoaded", async () => { + onPrefChange(); - Services.telemetry.setEventRecordingEnabled("firefoxview", true); Services.telemetry.recordEvent("firefoxview", "entered", "firefoxview", null); - document.getElementById("recently-closed-tabs-container").onLoad(); + if (Cu.isInAutomation) { + Services.obs.notifyObservers(null, "firefoxview-entered"); --- a/browser/components/newtab/lib/OnboardingMessageProvider.jsm +++ b/browser/components/newtab/lib/OnboardingMessageProvider.jsm @@ -92,57 +92,6 @@ const BASE_MESSAGES = () => [