hgfs – mercurial file system
Mercurial is a distributed version control system. It tracks
and organizes files and keeps a change history of them. The
file revisions are stored as packed deltas in a repository
that can be checked out with the
serves a mercurial repository as a read-only filesystem where
each file revision and its metadata is accessible as files.
The repository may be specified by passing the working directory
as the final argument. When omitted,
locates the repository by walking
upwards from the current working directory until the
sub-directory is found. If no
was specified with
then hgfs will mount itself on
(default). When a
name is given with the
flag, the 9p service pipe
is created and may be mounted from another namespace.
flag enables 9p debug messages.
The root of the served filesystem contains directories each
corresponding to a specific changeset revision in the
Revision directories are named by a revision id which
takes the form [d.]h, where
is the decimal revision number starting from 0 and
is the hexadecimal hash of the changeset. Both
the revision number
and the hash
are able to identify
a revision uniquely; only one of them needs to be given
when walking the root directory. The hexadecimal hash
may be shortened so long as the resulting lookup yields
a unique result. The special name
corresponds to the latest revision but does not appear
in the directory listing.
In each revision directory the following files can be found:
contains the revision id of the changeset.
contains the parent revision id of the changeset.
If the changeset was a merge, contains the other parent revision id. Otherwise, a zero size file.
file contains a list of file names, separated by a newline, that where
affected in this changeset. Files that are listed in the log
but are not accessible in the
directories have been deleted in this changeset.
committer of the changeset.
commit message of the changeset.
A directory that contains a snapshot of the tree at the time
the changeset was committed.
To retrieve the nth
past version of a file relative to the changeset,
one can append .n
to the filename. Appending .revn yields
a file that contains its revision id as text. Note that
appending .rev0 or .rev yields the file containing the
revision id of the changeset when the file was last modified
and .0 yields the same file as when omitting the appendix.
but contains only the changed files of the changeset.
first appeared in 9front (June, 2011).