Bug 1963756 - Change the path where the repo is bootstrapped by default with git. r=glob,sylvestre

Differential Revision: https://phabricator.services.mozilla.com/D247416
This commit is contained in:
Mike Hommey
2025-05-01 20:59:13 +00:00
committed by mh@glandium.org
parent 5c1d9210e4
commit 49204b4918
6 changed files with 13 additions and 13 deletions

View File

@@ -104,7 +104,7 @@ Once the System is bootstrapped, run:
.. code-block:: shell
$ cd mozilla-unified
$ cd firefox
$ ./mach build
which will check for dependencies and start the build.

View File

@@ -28,7 +28,7 @@ These steps were verified to work as of June 2020.
libx11-xcb-dev:i386 libpulse-dev:i386 libdrm-dev:i386
#. Then, create a ``mozconfig`` file in your Firefox code directory
(probably ``mozilla-unified``) that looks like the following example:
(probably ``firefox``) that looks like the following example:
.. code::

View File

@@ -69,7 +69,7 @@ Now that your system is bootstrapped, you should be able to build!
.. code-block:: shell
cd mozilla-unified
cd firefox
git pull
./mach build

View File

@@ -64,7 +64,7 @@ Now that your system is bootstrapped, you should be able to build!
.. code-block:: shell
cd mozilla-unified
cd firefox
git pull
./mach build
@@ -163,7 +163,7 @@ Below is an example for manual setup.
.. code-block:: shell
cd mozilla-unified
cd firefox
# Creates virtual environment for <your-desired-version> in folder .venv
python3.<your-desired-version> -m venv .venv
# Activates virtual environment

View File

@@ -124,7 +124,7 @@ Now that your system is bootstrapped, you should be able to build!
.. code-block:: shell
cd c:/mozilla-source/mozilla-unified
cd c:/mozilla-source/firefox
hg up -C central
./mach build
@@ -206,7 +206,7 @@ Python failed to find files in directories
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Python can sometimes fail to find files in directories when path length limits are reached,
even when the root directory is kept relatively short: ``C:\mozilla-source\mozilla-unified``. This can be resolved by
even when the root directory is kept relatively short: ``C:\mozilla-source\firefox``. This can be resolved by
`turning Windows long paths on <https://learn.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=registry>`_.
``PYTHON`` environment variable

View File

@@ -44,6 +44,7 @@ VCS_HUMAN_READABLE = {
"git-cinnabar": "Git",
}
GIT_REPO = "https://github.com/mozilla-firefox/firefox"
HG_REPO = "https://hg.mozilla.org/mozilla-unified"
def which(name):
@@ -86,7 +87,8 @@ def validate_clone_dest(dest: Path):
def input_clone_dest(vcs, no_interactive):
repo_name = "mozilla-unified"
repo = GIT_REPO if vcs == "git" else HG_REPO
repo_name = repo.rpartition("/")[2]
print(f"Cloning into {repo_name} using {VCS_HUMAN_READABLE[vcs]}...")
while True:
dest = None
@@ -127,7 +129,7 @@ def hg_clone_firefox(hg: Path, dest: Path, head_repo, head_rev):
# unless someone complains about it.
with open(dest / ".hg" / "hgrc", "a") as fh:
fh.write("[paths]\n")
fh.write("default = https://hg.mozilla.org/mozilla-unified\n")
fh.write(f"default = {HG_REPO}\n")
fh.write("\n")
# The server uses aggressivemergedeltas which can blow up delta chain
@@ -145,9 +147,7 @@ def hg_clone_firefox(hg: Path, dest: Path, head_repo, head_rev):
# use the "central" bookmark), at which point it will be an incremental pull,
# that the server can process more easily.
# This is the same thing that robustcheckout does on automation.
res = subprocess.call(
[str(hg), "pull", "https://hg.mozilla.org/mozilla-unified"], cwd=str(dest)
)
res = subprocess.call([str(hg), "pull", HG_REPO], cwd=str(dest))
if not res and head_repo:
res = subprocess.call(
[str(hg), "pull", head_repo, "-r", head_rev], cwd=str(dest)
@@ -251,7 +251,7 @@ def git_cinnabar_clone_firefox(git: Path, dest: Path, head_repo, head_rev):
"remote.origin.fetch=refs/heads/central:refs/remotes/origin/main",
"clone",
"--no-checkout",
"hg::https://hg.mozilla.org/mozilla-unified",
f"hg::{HG_REPO}",
str(dest),
],
env=env,