[manual index][section index]

NAME

hg/fs - mount mercurial repository

SYNOPSIS

mount { hg/fs [ -Dd ] [ -T revcache ] [ -h path ] } mtpt

DESCRIPTION

Hg/fs reads a mercurial repository and exports its contents over styx. It allows walking to the files of any revision, read the commit (log) message or manifest for any revision, or read a .tgz snapshot of any revision. Revisions are either numbers, (partial) ``nodeid''s, tags, branches (their tips) or the special name ``tip''.

Options
-D
Print styx traces to standard error.
-d
Print debugging messages, a second -d prints more messages.
-T revcache
Set maximum size of cache for the internal representation of a tree of files for a revision. Revcache is the maximum number of such structures, independent of size in bytes. The default is 64.
-h repopath
Use the repository at repopath. Otherwise, hg/fs looks for a directory .hg, first in the current directory and then up towards the root of the file system.

Files
lastrev
Read latest revision.
files/n/...
Access file hierarchy of revision n.
changes/...
For each file, read the revisions the file was changed in. Each revision is on a separate line with 7 fields: repository revision , the file's revision and nodeid , first parent's revision and nodeid and second parent's revision and nodeid . Absent parents are indicated by revision ``-1'' and an empty nodeid.
log/n
Read the log message for revision n.
manifest/n
Read the manifest for revision n.
manifestfull/n
Like manifest/ but lines have the nodeid for the path as first token.
tgz/reponame-n.tgz
Read the .tgz for revision n. As a special case, n can be ``latest''. It has the same semantics as ``tip''.
branches
Read the branches. One per line. Each line has three space-separated fields: nodeid, branch name, and tip revision of the branch.
tags
Read the branches. One per line. Each line has three space-separated fields: nodeid, tag name, and revision of the tag.

Symbolic revisions (such as ``tip'') are evaluated to a revision number when the revision is walked to. This means that a walk to ``tip'' and a subsequent commit to the repository will not update the open file.

For brevity, listing the contents of files, log, manifest and manifestfull will only list files with the names of tags, tips of branches (in the form ``branch-tip''), and ``tip'', not all revision numbers. All revisions can be walked to though. A stat(2) on these files will show the revision number as the name.

Listing the contents of tgz/ returns similar files: reponame-branch-rev.tgz, reponame-tag.tgz, and reponame-rev.tgz(for the tip), where reponame is the name of the repository (the name of the directory where hg/ resides in), branch-rev the numeric revision of the tip of each branch, and tag as the name of each tag. Again, any revision can be read, it is just not listed).

SOURCE

/appl/cmd/hg/fs.b
/appl/lib/mercurial.b

SEE ALSO

hgwebsrv(8)

hgfs(4 ) Rev:  Wed Feb 22 04:14:06 GMT 2023