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:
committed by
mh@glandium.org
parent
5c1d9210e4
commit
49204b4918
@@ -104,7 +104,7 @@ Once the System is bootstrapped, run:
|
|||||||
|
|
||||||
.. code-block:: shell
|
.. code-block:: shell
|
||||||
|
|
||||||
$ cd mozilla-unified
|
$ cd firefox
|
||||||
$ ./mach build
|
$ ./mach build
|
||||||
|
|
||||||
which will check for dependencies and start the build.
|
which will check for dependencies and start the build.
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ These steps were verified to work as of June 2020.
|
|||||||
libx11-xcb-dev:i386 libpulse-dev:i386 libdrm-dev:i386
|
libx11-xcb-dev:i386 libpulse-dev:i386 libdrm-dev:i386
|
||||||
|
|
||||||
#. Then, create a ``mozconfig`` file in your Firefox code directory
|
#. 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::
|
.. code::
|
||||||
|
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ Now that your system is bootstrapped, you should be able to build!
|
|||||||
|
|
||||||
.. code-block:: shell
|
.. code-block:: shell
|
||||||
|
|
||||||
cd mozilla-unified
|
cd firefox
|
||||||
git pull
|
git pull
|
||||||
./mach build
|
./mach build
|
||||||
|
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ Now that your system is bootstrapped, you should be able to build!
|
|||||||
|
|
||||||
.. code-block:: shell
|
.. code-block:: shell
|
||||||
|
|
||||||
cd mozilla-unified
|
cd firefox
|
||||||
git pull
|
git pull
|
||||||
./mach build
|
./mach build
|
||||||
|
|
||||||
@@ -163,7 +163,7 @@ Below is an example for manual setup.
|
|||||||
|
|
||||||
.. code-block:: shell
|
.. code-block:: shell
|
||||||
|
|
||||||
cd mozilla-unified
|
cd firefox
|
||||||
# Creates virtual environment for <your-desired-version> in folder .venv
|
# Creates virtual environment for <your-desired-version> in folder .venv
|
||||||
python3.<your-desired-version> -m venv .venv
|
python3.<your-desired-version> -m venv .venv
|
||||||
# Activates virtual environment
|
# Activates virtual environment
|
||||||
|
|||||||
@@ -124,7 +124,7 @@ Now that your system is bootstrapped, you should be able to build!
|
|||||||
|
|
||||||
.. code-block:: shell
|
.. code-block:: shell
|
||||||
|
|
||||||
cd c:/mozilla-source/mozilla-unified
|
cd c:/mozilla-source/firefox
|
||||||
hg up -C central
|
hg up -C central
|
||||||
./mach build
|
./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,
|
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>`_.
|
`turning Windows long paths on <https://learn.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=registry>`_.
|
||||||
|
|
||||||
``PYTHON`` environment variable
|
``PYTHON`` environment variable
|
||||||
|
|||||||
@@ -44,6 +44,7 @@ VCS_HUMAN_READABLE = {
|
|||||||
"git-cinnabar": "Git",
|
"git-cinnabar": "Git",
|
||||||
}
|
}
|
||||||
GIT_REPO = "https://github.com/mozilla-firefox/firefox"
|
GIT_REPO = "https://github.com/mozilla-firefox/firefox"
|
||||||
|
HG_REPO = "https://hg.mozilla.org/mozilla-unified"
|
||||||
|
|
||||||
|
|
||||||
def which(name):
|
def which(name):
|
||||||
@@ -86,7 +87,8 @@ def validate_clone_dest(dest: Path):
|
|||||||
|
|
||||||
|
|
||||||
def input_clone_dest(vcs, no_interactive):
|
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]}...")
|
print(f"Cloning into {repo_name} using {VCS_HUMAN_READABLE[vcs]}...")
|
||||||
while True:
|
while True:
|
||||||
dest = None
|
dest = None
|
||||||
@@ -127,7 +129,7 @@ def hg_clone_firefox(hg: Path, dest: Path, head_repo, head_rev):
|
|||||||
# unless someone complains about it.
|
# unless someone complains about it.
|
||||||
with open(dest / ".hg" / "hgrc", "a") as fh:
|
with open(dest / ".hg" / "hgrc", "a") as fh:
|
||||||
fh.write("[paths]\n")
|
fh.write("[paths]\n")
|
||||||
fh.write("default = https://hg.mozilla.org/mozilla-unified\n")
|
fh.write(f"default = {HG_REPO}\n")
|
||||||
fh.write("\n")
|
fh.write("\n")
|
||||||
|
|
||||||
# The server uses aggressivemergedeltas which can blow up delta chain
|
# 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,
|
# use the "central" bookmark), at which point it will be an incremental pull,
|
||||||
# that the server can process more easily.
|
# that the server can process more easily.
|
||||||
# This is the same thing that robustcheckout does on automation.
|
# This is the same thing that robustcheckout does on automation.
|
||||||
res = subprocess.call(
|
res = subprocess.call([str(hg), "pull", HG_REPO], cwd=str(dest))
|
||||||
[str(hg), "pull", "https://hg.mozilla.org/mozilla-unified"], cwd=str(dest)
|
|
||||||
)
|
|
||||||
if not res and head_repo:
|
if not res and head_repo:
|
||||||
res = subprocess.call(
|
res = subprocess.call(
|
||||||
[str(hg), "pull", head_repo, "-r", head_rev], cwd=str(dest)
|
[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",
|
"remote.origin.fetch=refs/heads/central:refs/remotes/origin/main",
|
||||||
"clone",
|
"clone",
|
||||||
"--no-checkout",
|
"--no-checkout",
|
||||||
"hg::https://hg.mozilla.org/mozilla-unified",
|
f"hg::{HG_REPO}",
|
||||||
str(dest),
|
str(dest),
|
||||||
],
|
],
|
||||||
env=env,
|
env=env,
|
||||||
|
|||||||
Reference in New Issue
Block a user