]> git.lizzy.rs Git - plan9front.git/blob - sys/man/4/hgfs
webfs(4): read the whole man page before committing corrections
[plan9front.git] / sys / man / 4 / hgfs
1 .TH HGFS 4
2 .SH NAME
3 hgfs \- mercurial file system
4 .SH SYNOPSIS
5 .B hgfs
6 [
7 .B -D
8 ]
9 [
10 .B -m
11 .I mtpt
12 ]
13 [
14 .B -s
15 .I service
16 ]
17 [
18 .I dir
19 ]
20 .SH DESCRIPTION
21 Mercurial is a distributed version control system. It tracks
22 and organizes files and keeps a change history of them. The
23 file revisions are stored as packed deltas in a repository
24 that can be checked out with the
25 .IR hg (1)
26 program.
27
28 .I Hgfs
29 serves a mercurial repository as a read-only filesystem where
30 each file revision and its metadata is accessible as files.
31
32 The repository may be specified by passing the working directory
33 .I dir
34 as the final argument. When omitted,
35 .I hgfs
36 locates the repository by waking
37 upwards from the current working directory until the
38 .B .hg
39 sub-directory is found. If no
40 .I mtpt
41 was specified with
42 .B -m
43 ,
44 then hgfs will mount itself on
45 .B /mnt/hg
46 (default). When a
47 .I service
48 name is given with the
49 .B -s
50 flag, the 9p service pipe 
51 .B /srv/\fIservice\fR
52 is created and may be mounted from another namespace.
53 The
54 .B -D
55 flag enables 9p debug messages.
56
57 The root of the served filesystem contains directories each 
58 corresponding to a specific changeset revision in the
59 repository.
60
61 Revision directories are named by a revision id which
62 takes the form [\fId\fB.\fR]\fIh\fR, where
63 .I d
64 is the decimal revision number starting from 0 and
65 .I h
66 is the hexadecimal hash of the changeset. Both
67 the revision number
68 .I d
69 and the hash
70 .I h
71 are able to identify
72 a revision uniquely; only one of them needs to be given
73 when walking the root directory. The hexadecimal hash
74 may be shortend so long as the resulting lookup yields
75 a unique result. The special name
76 .B tip
77 corresponds to the latest revision but does not appear
78 in the directory listing.
79
80 In each revision directory the following files can be found:
81 .TP
82 .B rev
83 contains the revision id of the changeset.
84 .TP
85 .B rev1
86 contains the parent revision id of the changeset.
87 .TP
88 .B rev2
89 If the changeset was a merge, contains the other parent revision id. Otherwise, a zero size file.
90 .TP
91 .B log
92 The
93 .B log
94 file contains a list of file names, separated by a newline, that where
95 affected in this changeset. Files that are listed in the log
96 but are not accessible in the
97 .B files
98 or
99 .B changes
100 directories have been deleted in this changeset.
101 .TP
102 .B who
103 committer of the changeset.
104 .TP
105 .B why
106 commit message of the changeset.
107 .TP
108 .B files
109 A directory that contains a snapshot of the tree at the time
110 the changeset was commited.
111
112 To retrieve the \fIn\fRth
113 past version of a file relative to the changeset,
114 one can append \fB.\fIn\fR
115 to the filename. Appending \fB.rev\fIn\fR yields
116 a file that contains its revision id as text. Note that
117 appending \fB.rev\fI0\fR or \fB.rev\fR yields the file containing the
118 revision id of the changeset when the file was last modified
119 and \fB.\fI0\fR yields the same file as when omitting the appendix.
120 .TP
121 .B changes
122 Same as
123 .B files,
124 but contains only the changed files of the changeset.
125 .SH SEE ALSO
126 .IR hg (1)