diff --git a/docs/code-quality/coding-style/format_cpp_code_with_clang-format.rst b/docs/code-quality/coding-style/format_cpp_code_with_clang-format.rst index e5fb9246837d..9b84a4b56c7c 100644 --- a/docs/code-quality/coding-style/format_cpp_code_with_clang-format.rst +++ b/docs/code-quality/coding-style/format_cpp_code_with_clang-format.rst @@ -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. diff --git a/docs/code-quality/lint/linters/ignorefile.rst b/docs/code-quality/lint/linters/ignorefile.rst index 1f8a7c29b611..6677340b18a0 100644 --- a/docs/code-quality/lint/linters/ignorefile.rst +++ b/docs/code-quality/lint/linters/ignorefile.rst @@ -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 diff --git a/docs/code-quality/lint/usage.rst b/docs/code-quality/lint/usage.rst index 991c84495881..c0b52ba9e49c 100644 --- a/docs/code-quality/lint/usage.rst +++ b/docs/code-quality/lint/usage.rst @@ -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: diff --git a/docs/contributing/editors/vim.rst b/docs/contributing/editors/vim.rst index 0e35d5ca3c3a..238e3b0b738d 100644 --- a/docs/contributing/editors/vim.rst +++ b/docs/contributing/editors/vim.rst @@ -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: diff --git a/docs/contributing/how_to_submit_a_patch.rst b/docs/contributing/how_to_submit_a_patch.rst index 584623fa3e54..68e9e2d5af81 100644 --- a/docs/contributing/how_to_submit_a_patch.rst +++ b/docs/contributing/how_to_submit_a_patch.rst @@ -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 diff --git a/docs/contributing/reviewer_checklist.rst b/docs/contributing/reviewer_checklist.rst index cfe772dba984..0ed1b72992a3 100644 --- a/docs/contributing/reviewer_checklist.rst +++ b/docs/contributing/reviewer_checklist.rst @@ -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 `__. - In git, you can use git rebase --whitespace=fix. +- Trailing whitespace (git diff highlight this). You can use git rebase --whitespace=fix. Security issues diff --git a/docs/setup/configuring_build_options.rst b/docs/setup/configuring_build_options.rst index d8e30462e6d0..40dd4313c1c6 100644 --- a/docs/setup/configuring_build_options.rst +++ b/docs/setup/configuring_build_options.rst @@ -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. diff --git a/docs/setup/contributing_code.rst b/docs/setup/contributing_code.rst index 7b6f2831223f..42b8f7bed7e3 100644 --- a/docs/setup/contributing_code.rst +++ b/docs/setup/contributing_code.rst @@ -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 diff --git a/docs/setup/linux_build.rst b/docs/setup/linux_build.rst index dfaa6bf10508..fb22566fd88a 100644 --- a/docs/setup/linux_build.rst +++ b/docs/setup/linux_build.rst @@ -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 `_, 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 + curl -L https://raw.githubusercontent.com/mozilla-firefox/firefox/refs/heads/main/python/mozboot/bin/bootstrap.py - # 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 - - python3 bootstrap.py --vcs=git - - This uses `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! diff --git a/docs/setup/windows_build.rst b/docs/setup/windows_build.rst index 452035b3fd12..7ceacc71f91d 100644 --- a/docs/setup/windows_build.rst +++ b/docs/setup/windows_build.rst @@ -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 `_ 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 `_, and add the python directory