]> git.lizzy.rs Git - plan9front.git/blob - sys/man/4/hgfs
hgfs(4): cleanup
[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 /n/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]\fIhhhhhhhhhhhh\fR, where
63 .I d
64 is the decimal revision number starting from 0 and
65 .I hhhhhhhhhhhh
66 is the hexadecimal hash prefix of the changeset. Both
67 the revision number
68 .I d
69 and the hash prefix
70 .I hhhhhhhhhhhh
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 rev1
83 contains the parent revision id as text.
84 .TP
85 .B rev2
86 If the changeset was a merge, contains the other parent revision id. Otherwise, a zero size file.
87 .TP
88 .B log
89 The
90 .B log
91 file contains a list of file names, separated by a newline, that where
92 affected in this changeset. Files that are listed in the log
93 but are not accessible in the
94 .B files
95 or
96 .B changes
97 directories have been deleted in this changeset.
98 .TP
99 .B who
100 committer of the changeset.
101 .TP
102 .B why
103 commit message of the changeset.
104 .TP
105 .B files
106 A directory that contains a snapshot of the tree at the time
107 the changeset was commited.
108
109 To retrieve the \fIn\fRth
110 past version of a file relative to the changeset,
111 one can append \fB.\fIn\fR
112 to the filename. Appending \fB.rev\fIn\fR yields
113 a file that contains its revision id as text. Note that
114 appending \fB.rev\fI0\fR or \fB.rev\fR yields the file containing the
115 revision id of the changeset when the file was last modified
116 and \fB.\fI0\fR yields the same file as when omitting the appendix.
117 .TP
118 .B changes
119 Same as
120 .B files,
121 but contains only the changed files of the changeset.
122 .SH SEE ALSO
123 .IR hg (1)