# Install mercurial

Scalable distributed version control system. Version 7.2.2 via Homebrew; verified 2026-06-08.

## Install

```sh
sudo av install brew:mercurial
```

## Agent safety answer

mercurial mutates source-control repositories and remote history.

- **Credential access:** Reads repository config, credential helpers, auth files, and local history.
- **Remote mutation:** Can push changesets, tags, bookmarks, and remote repository changes.
- **Publish/artifact risk:** Can publish source changes and release tags.
- **Recommended control:** Gate pushes, credential reads, destructive history operations, and tag creation.
- **Agent-use guidance:** Allow status/log/diff; require approval for pushes, credential use, and history rewrites.

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install mercurial
```

  Evidence: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install mercurial
```

  Evidence: MacPorts ports tree: devel/mercurial/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- apk (92%):

```sh
sudo apk add mercurial
```

  Evidence: Alpine Linux edge package indexes: mercurial from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz

- Debian apt (92%):

```sh
sudo apt install mercurial
```

  Evidence: Debian stable package indexes: mercurial from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

- dnf (92%):

```sh
sudo dnf install mercurial
```

  Evidence: Fedora Rawhide package metadata: mercurial from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/13ee7b80cb813542594d4235c4a0b8695435d5ecf23dd3580bc7515ae1b6180d-primary.xml.zst

- Nix (92%):

```sh
nix profile install nixpkgs#mercurial
```

  Evidence: nixpkgs package indexes: pkgs/by-name/me/mercurial/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

- pacman (92%):

```sh
sudo pacman -S mercurial
```

  Evidence: Arch Linux sync databases: mercurial from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz

- zypper (92%):

```sh
sudo zypper install mercurial
```

  Evidence: openSUSE Tumbleweed package metadata: mercurial from https://download.opensuse.org/tumbleweed/repo/oss/repodata/155b97171d05e27afd950b6fe0d55513ff38f4597110664535bceedc680bbe6fd459f0733718dcc21dcf0efc7c8250fd1390c73d4790b42e62fb2c16a87242e5-primary.xml.zst

### Windows

- Scoop (92%):

```sh
scoop install main/mercurial
```

  Evidence: Scoop official bucket manifest trees: bucket/mercurial.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1

- winget (92%):

```sh
winget install --id Mercurial.Mercurial -e
```

  Evidence: Windows Package Manager source index: Mercurial.Mercurial from https://cdn.winget.microsoft.com/cache/source.msix

- Chocolatey (92%):

```sh
choco install hg
```

  Evidence: Chocolatey community package catalog: hg from http://community.chocolatey.org/api/v2/Packages?$filter=IsLatestVersion&$select=Id&$top=1000&$skiptoken='11','hexchat'

## Package Facts

- **Package key:** brew:mercurial
- **Package manager:** Homebrew
- **Package manager URL:** <https://formulae.brew.sh/formula/mercurial>
- **Version:** 7.2.2
- **Source summary:** Scalable distributed version control system
- **Homepage:** <https://mercurial-scm.org/>
- **Repository:** <https://foss.heptapod.net/mercurial/mercurial-devel>
- **Upstream docs:** <https://www.mercurial-scm.org/>
- **License:** GPL-2.0-or-later
- **Source archive:** <https://www.mercurial-scm.org/release/mercurial-7.2.2.tar.gz>
- **Last updated:** 2026-06-08T02:28:30Z
- **Generated:** 2026-06-10T07:18:26+00:00

## Executables

- chg (cli)
- hg (cli)
- chg (alias)
- hg (alias)

## Dependencies

- python@3.14

## Install Behavior

- Post-install hook: not defined
- Bottle: available on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sequoia, sonoma, tahoe, x86_64_linux

## Freshness

- Page generated: 2026-06-10
- Package-manager version: 7.2.2
- Package-manager updated: 2026-06-08
- Local data status: ok
- Upstream repository: https://mercurial-scm.org/
- info: Release/tag comparison is only available for GitHub repositories.

## 安全说明

no executable entrypoint in the package index.

- **Protected-tool coverage:** Plain Text Mercurial Auth Passwords
- **Geiger risk:** green / low
- no executable entrypoint in the package index

## Source Database Details

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** mercurial
- **Aliases:** hg
- **Version Scheme:** 0
- **Revision:** 0
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** stable

## Other Package-Manager Records

- Debian apt - mercurial - 7.0.1-2: normalized package name match | Debian stable package indexes: mercurial from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | easy-to-use, scalable distributed version control system | https://www.mercurial-scm.org/
- Debian apt - mercurial-common - 7.0.1-2: normalized package name match | Debian stable package indexes: mercurial-common from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | easy-to-use, scalable distributed version control system (common files) | https://www.mercurial-scm.org/
- Nix - mercurial: normalized package name match | nixpkgs package indexes: pkgs/by-name/me/mercurial/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - mercurial - 6.7.2-1ubuntu2: normalized package name match | Ubuntu 24.04 LTS package indexes: mercurial from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | easy-to-use, scalable distributed version control system | https://www.mercurial-scm.org/
- Ubuntu apt - mercurial-common - 6.7.2-1ubuntu2: normalized package name match | Ubuntu 24.04 LTS package indexes: mercurial-common from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | easy-to-use, scalable distributed version control system (common files) | https://www.mercurial-scm.org/
- apk - mercurial - 7.2.1-r0: normalized package name match | Alpine Linux edge package indexes: mercurial from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Scalable distributed SCM tool | https://www.mercurial-scm.org/
- apk - mercurial-bash-completion - 7.2.1-r0: normalized package name match | Alpine Linux edge package indexes: mercurial-bash-completion from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Bash completions for mercurial | https://www.mercurial-scm.org/
- apk - mercurial-chg - 7.2.1-r0: normalized package name match | Alpine Linux edge package indexes: mercurial-chg from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Client for Mercurial command server with cHg extension | https://www.mercurial-scm.org/
- apk - mercurial-doc - 7.2.1-r0: normalized package name match | Alpine Linux edge package indexes: mercurial-doc from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Scalable distributed SCM tool (documentation) | https://www.mercurial-scm.org/
- apk - mercurial-lang - 7.2.1-r0: normalized package name match | Alpine Linux edge package indexes: mercurial-lang from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | translations for mercurial | https://www.mercurial-scm.org/
- apk - mercurial-pyc - 7.2.1-r0: normalized package name match | Alpine Linux edge package indexes: mercurial-pyc from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Precompiled Python bytecode for mercurial | https://www.mercurial-scm.org/
- apk - mercurial-vim - 7.2.1-r0: normalized package name match | Alpine Linux edge package indexes: mercurial-vim from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Vim syntax for mercurial | https://www.mercurial-scm.org/
- apk - mercurial-zsh-completion - 7.2.1-r0: normalized package name match | Alpine Linux edge package indexes: mercurial-zsh-completion from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Zsh completions for mercurial | https://www.mercurial-scm.org/
- dnf - mercurial - 7.2.1-1.fc45: normalized package name match | Fedora Rawhide package metadata: mercurial from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/13ee7b80cb813542594d4235c4a0b8695435d5ecf23dd3580bc7515ae1b6180d-primary.xml.zst | A fast, lightweight Source Control Management system | https://mercurial-scm.org/
- dnf - mercurial-chg - 7.2.1-1.fc45: normalized package name match | Fedora Rawhide package metadata: mercurial-chg from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/13ee7b80cb813542594d4235c4a0b8695435d5ecf23dd3580bc7515ae1b6180d-primary.xml.zst | A fast Mercurial command without slow Python startup | https://mercurial-scm.org/
- dnf - mercurial-hgk - 7.2.1-1.fc45: normalized package name match | Fedora Rawhide package metadata: mercurial-hgk from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/13ee7b80cb813542594d4235c4a0b8695435d5ecf23dd3580bc7515ae1b6180d-primary.xml.zst | Hgk interface for mercurial | https://mercurial-scm.org/


## Related Links

- [Source-control packages](https://www.automicvault.com/zh-hans/pkg/source-control-tools/) - Belongs to a source-control command family.
- [Secret-risk packages](https://www.automicvault.com/zh-hans/pkg/secret-risk-packages/) - Has protected-tool coverage, approval-gate, or non-low Geiger security signals.
- [Terminal utility packages](https://www.automicvault.com/zh-hans/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Text processing packages](https://www.automicvault.com/zh-hans/pkg/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [python@3.14](https://www.automicvault.com/zh-hans/pkg/brew/python-3-14/) - Runtime dependency declared by Homebrew.
- [git-cinnabar](https://www.automicvault.com/zh-hans/pkg/brew/git-cinnabar/) - Popular package that depends on this formula.
- [hg-fast-export](https://www.automicvault.com/zh-hans/pkg/brew/hg-fast-export/) - Popular package that depends on this formula.
- [breezy](https://www.automicvault.com/zh-hans/pkg/brew/breezy/) - Shares av.db curated category or tags: cli, developer-tools, distributed-vcs, python, version-control.
- [git](https://www.automicvault.com/zh-hans/pkg/brew/git/) - Shares av.db curated category or tags: cli, developer-tools, distributed-vcs, version-control.
- [jj](https://www.automicvault.com/zh-hans/pkg/brew/jj/) - Shares av.db curated category or tags: cli, developer-tools, scm, version-control.
- [fossil](https://www.automicvault.com/zh-hans/pkg/brew/fossil/) - Shares av.db curated category or tags: cli, developer-tools, scm, version-control.
- [cvs](https://www.automicvault.com/zh-hans/pkg/brew/cvs/) - Shares av.db curated category or tags: cli, developer-tools, scm, version-control.
- [pygitup](https://www.automicvault.com/zh-hans/pkg/brew/pygitup/) - Shares av.db curated category or tags: cli, developer-tools, python, version-control.
- [darcs](https://www.automicvault.com/zh-hans/pkg/brew/darcs/) - Shares av.db curated category or tags: cli, developer-tools, distributed-vcs, version-control.

## Sources

- Nucleus package database
- Geiger risk classifier
- secret-handling manifest
- local coverage README
- package-page enrichment
- package version freshness
- av.db category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
- curated agent safety answer
