# Install mercurial with Homebrew

Scalable distributed version control system. Version 7.2.3 via Homebrew; verified 2026-06-29.

## 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: provider-native install command

## Package facts

- **Package key:** brew:mercurial
- **Package manager:** Homebrew
- **Version:** 7.2.3
- **Source summary:** Scalable distributed version control system
- **Homepage:** <https://mercurial-scm.org/>
- **Last updated:** 2026-06-29T18:50:44Z
- **Generated:** 2026-08-03T00:40:33+00:00

## Executables

- chg (alias)
- hg (alias)

## Install behavior

- Bottle: not available

## Freshness

- Page generated: 2026-08-03
- Package-manager version: 7.2.3
## Project history and usage

Mercurial is a distributed source-control management system invoked mainly through the hg command. Matt Mackall, later Olivia Mackall, started it in April 2005 after Linux kernel developers lost the free BitKeeper arrangement. The Architecture of Open Source Applications describes Mercurial and Git as parallel 2005 responses to the need for a scalable distributed VCS capable of handling large kernel-sized histories; it also notes Mackall's early goals of simplicity, scalability, and efficiency.

### Project history

Technically, Mercurial stores project history as a distributed graph of changesets. Like Git, it uses SHA-1-derived changeset identifiers, but it emphasizes a comparatively small, coherent command set and a clone model where most operations are local. The official Mercurial site positions it as a free distributed SCM that handles projects of any size, supports many workflows, and can be extended.

### Adoption history

Mercurial's adoption history is strongly tied to large repositories and to teams that valued a scriptable CLI with a less sprawling user model than Git. Facebook selected Mercurial while replacing a Subversion server plus Git mirror, then published work on scaling it for a repository with thousands of weekly commits and hundreds of thousands of files. That scaling lineage later connected to Mononoke and Sapling: Meta's Sapling README says Sapling's CLI was originally based on Mercurial and shares aspects of Mercurial's UI and features, while Mononoke is described as a Mercurial source-control server for large monorepos.

### How it is used

For package managers, Mercurial is a classic cross-platform developer tool rather than an application-specific CLI. It appears across Homebrew, Debian, Ubuntu, Fedora, Arch, Nix, MacPorts, Windows package managers, and others, with hg as the primary executable and chg as a command server client for faster repeated commands.

### Sources

- <https://aosabook.org/en/v1/mercurial.html>
- <https://engineering.fb.com/2014/01/07/core-infra/scaling-mercurial-at-facebook/>
- <https://github.com/facebook/sapling>
- <https://github.com/facebookarchive/mononoke>
- <https://www.mercurial-scm.org/>


## Security Notes

No matching local secret-handling manifest was found for mercurial. Nucleus package metadata is still published here so future coverage has a stable package URL.



## Configuration and credential file locations

These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.


## Configuration files

- Unix: ~/.hgrc, $XDG_CONFIG_HOME/hg/hgrc, ~/.config/hg/hgrc

## Credential files

- Unix: ~/.hgrc, $XDG_CONFIG_HOME/hg/hgrc, ~/.config/hg/hgrc

## Combined YAML source

View the package source record on GitHub. [combined/mercurial.yml](https://github.com/automic-vault/db/blob/main/combined/mercurial.yml)


## Sources

- Nucleus package database
- Geiger risk classifier
- curated configuration and credential file locations
- curated package history
- pkgdb category and tag curation
- curated agent safety answer
