Bug 1962537 - docs: remove more hg docs

Differential Revision: https://phabricator.services.mozilla.com/D246772
This commit is contained in:
Sylvestre Ledru
2025-04-29 22:27:27 +00:00
parent 96d082f80e
commit 07abc3ac8a
10 changed files with 15 additions and 82 deletions

View File

@@ -59,7 +59,6 @@ Formatting specific commits / revisions
$ ./mach clang-format -c HEAD # Format a single git commit
$ ./mach clang-format -c HEAD~~..HEAD # Format a range of git commits
$ ./mach clang-format -c . # Format a single mercurial revision
The command accepts a ``-c`` argument that takes a revision number or
commit range, and will format the lines modified by those commits.

View File

@@ -25,9 +25,8 @@ The following special comment can be used to ignore the pattern in the next line
.. parsed-literal::
# lint-ignore-next-line: git-only
# lint-ignore-next-line: hg-only
The next line exists only in ``.gitignore``. or ``.hgignore``.
The next line exists only in ``.gitignore``.
.. parsed-literal::
# lint-ignore-next-line: syntax-difference

View File

@@ -40,8 +40,8 @@ You can see a list of the available linters by running:
./mach lint --list
Finally, ``mozlint`` can lint the files touched by outgoing revisions or the working directory using
the ``-o/--outgoing`` and ``-w/--workdir`` arguments respectively. These work both with mercurial and
git. In the case of ``--outgoing``, the default remote repository the changes would be pushed to is
the ``-o/--outgoing`` and ``-w/--workdir`` arguments respectively.
In the case of ``--outgoing``, the default remote repository the changes would be pushed to is
used as the comparison. If desired, a remote can be specified manually. In git, you may only want to
lint staged commits from the working directory, this can be accomplished with ``--workdir=staged``.
Examples:

View File

@@ -22,7 +22,7 @@ default of :code:`nvim-lspconfig` is to search for the closest
.. code ::
root_dir = lspconfig.util.root_pattern(".git", ".hg")
root_dir = lspconfig.util.root_pattern(".git")
You also need to set some options to get full diagnostics:

View File

@@ -112,7 +112,7 @@ choosing reviewers, and the full reviewer syntax, please see
:ref:`Getting reviews`.
You can edit the message of the current commit at any time using
``hg commit --amend`` or ``hg histedit``.
``git commit --amend`` or ``git rebase -i``.
Also look at our :ref:`Reviewer Checklist` for a list
of best practices for patch content that reviewers will check for or

View File

@@ -56,11 +56,7 @@ Style
isn't formally documented.
- New files have license declarations and modelines.
- New JS files should use strict mode.
- Trailing whitespace (git diff and splinter view both highlight this,
as does hg with the color extension enabled). Whitespace can be fixed
easily in Mercurial using the `CheckFiles
extension <https://www.mercurial-scm.org/wiki/CheckFilesExtension>`__.
In git, you can use git rebase --whitespace=fix.
- Trailing whitespace (git diff highlight this). You can use git rebase --whitespace=fix.
Security issues

View File

@@ -406,7 +406,7 @@ Adding a statement like the following to a ``mozconfig`` file:
will cause this file to be appended to each ``moz.build`` file of the tree. It
is recommended to place this file outside of the tree, so that it is not wiped
when cleaning up the tree via ``hg clean`` or ``git clean``.
when cleaning up the tree via ``git clean``.
This hook file is written in the same subset of Python as ``moz.build`` files.

View File

@@ -102,9 +102,9 @@ Who is the right person to ask for a review?
- If you have a mentored bug: ask your mentor. They will help, or can
easily find out. It might be them!
- Run ``{hg, git} blame`` on the file and look for the people who have touched
- Run ``git blame`` on the file and look for the people who have touched
the functions you're working on. They too are good candidates.
Running ``{hg, git} log`` and looking for regular reviewers might be a
Running ``git log`` and looking for regular reviewers might be a
solution too.
- The bug itself may contain a clear indication of the best person to
ask for a review

View File

@@ -26,63 +26,21 @@ Requirements
1. System preparation
---------------------
1.1 Install Python
~~~~~~~~~~~~~~~~~~
To build Firefox, it's necessary to have a Python of version 3.8 or later
installed. Python 2 is no longer required to build Firefox, although it is still
required for running some kinds of tests. Additionally, you will probably need
Python development files as well to install some pip packages.
You should be able to install Python using your system package manager:
You should be able to install Python and git using your system package manager:
- For Debian-based Linux (such as Ubuntu): ``sudo apt update && sudo apt install curl python3 python3-pip``
- For Fedora Linux: ``sudo dnf install python3 python3-pip``
- For Debian-based Linux (such as Ubuntu): ``sudo apt update && sudo apt install curl python3 python3-pip git``
- For Fedora Linux: ``sudo dnf install python3 python3-pip git``
If you need a version of Python that your package manager doesn't have (e.g.:
the provided Python 3 is too old, or you want Python 2 but it's not available),
then you can use `pyenv <https://github.com/pyenv/pyenv>`_, assuming that your
system is supported.
1.2 Install Mercurial
~~~~~~~~~~~~~~~~~~~~~
Mozilla's source code is hosted in Mercurial repositories. You will
need Mercurial to download and update the code.
Note that if you'd prefer to use the version of Mercurial that is
packaged by your distro, you can skip this section. However, keep in
mind that distro-packaged Mercurial may be outdated, and therefore
slower and less supported.
.. code-block:: shell
python3 -m pip install --user mercurial
You can test that Mercurial is installed by running:
.. code-block:: shell
hg version
.. note::
If your shell is showing ``command not found: hg``, then Python's packages aren't
being found in the ``$PATH``. You can resolve this by doing the following and
restarting your shell:
.. code-block:: shell
# If you're using zsh
echo 'export PATH="'"$(python3 -m site --user-base)"'/bin:$PATH"' >> ~/.zshenv
# If you're using bash
echo 'export PATH="'"$(python3 -m site --user-base)"'/bin:$PATH"' >> ~/.bashrc
# If you're using a different shell, follow its documentation to see
# how to configure your PATH. Ensure that `$(python3 -m site --user-base)/bin`
# is prepended.
2. Bootstrap a copy of the Firefox source code
----------------------------------------------
@@ -93,25 +51,10 @@ the interactive setup process.
.. code-block:: shell
curl -L https://hg.mozilla.org/mozilla-central/raw-file/default/python/mozboot/bin/bootstrap.py -O
# To use Git as your VCS
python3 bootstrap.py --vcs=git
# To use Mercurial as your VCS
python3 bootstrap.py
.. note::
To use ``git``, you can grab the source code in "git" form by running the
bootstrap script with the ``vcs`` parameter:
.. code-block:: shell
curl -L https://raw.githubusercontent.com/mozilla-firefox/firefox/refs/heads/main/python/mozboot/bin/bootstrap.py
python3 bootstrap.py --vcs=git
This uses `Git Cinnabar <https://github.com/glandium/git-cinnabar/>`_ under the hood.
Choosing a build type
~~~~~~~~~~~~~~~~~~~~~
@@ -127,7 +70,7 @@ Now that your system is bootstrapped, you should be able to build!
.. code-block:: shell
cd mozilla-unified
hg up -C central
git pull
./mach build
🎉 Congratulations! You've built your own home-grown Firefox!

View File

@@ -20,11 +20,7 @@ System Requirements
Required Installations
----------------------
- **Mercurial:** Ensure that the ``hg`` command works from PowerShell. If it is not set up,
download `Mercurial/TortoiseHg <https://www.mercurial-scm.org/downloads>`_ and ensure
the hg directory is added to your path. For example, this could be
``C:\Program Files\Mercurial`` or
``C:\Program Files\TortoiseHg``.
- **git:** Ensure that the ``git`` command works from PowerShell.
- **Python:** Ensure that the ``python`` and ``pip3`` commands work from PowerShell. If it is not
set up, download `python 3.11 <https://www.python.org/downloads/release/python-3119/>`_, and add
the python directory