a73a964e51
they've served us well, and can ride off into the sunset.
129 lines
3 KiB
Text
129 lines
3 KiB
Text
.TH HGFS 4
|
|
.SH NAME
|
|
hgfs \- mercurial file system
|
|
.SH SYNOPSIS
|
|
.B hgfs
|
|
[
|
|
.B -D
|
|
]
|
|
[
|
|
.B -m
|
|
.I mtpt
|
|
]
|
|
[
|
|
.B -s
|
|
.I service
|
|
]
|
|
[
|
|
.I dir
|
|
]
|
|
.SH DESCRIPTION
|
|
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
|
|
.I hg
|
|
program.
|
|
|
|
.I Hgfs
|
|
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
|
|
.I dir
|
|
as the final argument. When omitted,
|
|
.I hgfs
|
|
locates the repository by walking
|
|
upwards from the current working directory until the
|
|
.B .hg
|
|
sub-directory is found. If no
|
|
.I mtpt
|
|
was specified with
|
|
.B -m
|
|
,
|
|
then hgfs will mount itself on
|
|
.B /mnt/hg
|
|
(default). When a
|
|
.I service
|
|
name is given with the
|
|
.B -s
|
|
flag, the 9p service pipe
|
|
.B /srv/\fIservice\fR
|
|
is created and may be mounted from another namespace.
|
|
The
|
|
.B -D
|
|
flag enables 9p debug messages.
|
|
|
|
The root of the served filesystem contains directories each
|
|
corresponding to a specific changeset revision in the
|
|
repository.
|
|
|
|
Revision directories are named by a revision id which
|
|
takes the form [\fId\fB.\fR]\fIh\fR, where
|
|
.I d
|
|
is the decimal revision number starting from 0 and
|
|
.I h
|
|
is the hexadecimal hash of the changeset. Both
|
|
the revision number
|
|
.I d
|
|
and the hash
|
|
.I h
|
|
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
|
|
.B tip
|
|
corresponds to the latest revision but does not appear
|
|
in the directory listing.
|
|
|
|
In each revision directory the following files can be found:
|
|
.TP
|
|
.B rev
|
|
contains the revision id of the changeset.
|
|
.TP
|
|
.B rev1
|
|
contains the parent revision id of the changeset.
|
|
.TP
|
|
.B rev2
|
|
If the changeset was a merge, contains the other parent revision id. Otherwise, a zero size file.
|
|
.TP
|
|
.B log
|
|
The
|
|
.B log
|
|
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
|
|
.B files
|
|
or
|
|
.B changes
|
|
directories have been deleted in this changeset.
|
|
.TP
|
|
.B who
|
|
committer of the changeset.
|
|
.TP
|
|
.B why
|
|
commit message of the changeset.
|
|
.TP
|
|
.B files
|
|
A directory that contains a snapshot of the tree at the time
|
|
the changeset was committed.
|
|
|
|
To retrieve the \fIn\fRth
|
|
past version of a file relative to the changeset,
|
|
one can append \fB.\fIn\fR
|
|
to the filename. Appending \fB.rev\fIn\fR yields
|
|
a file that contains its revision id as text. Note that
|
|
appending \fB.rev\fI0\fR or \fB.rev\fR yields the file containing the
|
|
revision id of the changeset when the file was last modified
|
|
and \fB.\fI0\fR yields the same file as when omitting the appendix.
|
|
.TP
|
|
.B changes
|
|
Same as
|
|
.B files,
|
|
but contains only the changed files of the changeset.
|
|
.SH SOURCE
|
|
.B /sys/src/cmd/hgfs
|
|
.SH HISTORY
|
|
.I Hgfs
|
|
first appeared in 9front (June, 2011).
|