hg-root(1)

hg-root1

Print the root (top) of the current working directory

Usage

hg root

Overview

Print the root directory of the current repository.

Template:

The following keywords are supported in addition to the common template keywords and functions. See also hg help templates.

hgpath

String. Path to the .hg directory.

storepath

String. Path to the directory holding versioned data.

Returns 0 on success.

Options

--share-source

print the share source root instead

-T,--template <TEMPLATE>

display with template

From mercurial 7.2.4-1 in Arch Linux 2026-11-01. Parsed by carta from the page's man source.