hgfs: add rev file, document in manual page
This commit is contained in:
parent
6039c95bcb
commit
18bfca7978
2 changed files with 15 additions and 7 deletions
|
@ -59,15 +59,15 @@ corresponding to a specific changeset revision in the
|
|||
repository.
|
||||
|
||||
Revision directories are named by a revision id which
|
||||
takes the form [\fId\fB.\fR]\fIhhhhhhhhhhhh\fR, where
|
||||
takes the form [\fId\fB.\fR]\fIh\fR, where
|
||||
.I d
|
||||
is the decimal revision number starting from 0 and
|
||||
.I hhhhhhhhhhhh
|
||||
is the hexadecimal hash prefix of the changeset. Both
|
||||
.I h
|
||||
is the hexadecimal hash of the changeset. Both
|
||||
the revision number
|
||||
.I d
|
||||
and the hash prefix
|
||||
.I hhhhhhhhhhhh
|
||||
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
|
||||
|
@ -79,8 +79,11 @@ 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 as text.
|
||||
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.
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
enum {
|
||||
Qroot,
|
||||
Qrev,
|
||||
Qrev0,
|
||||
Qrev1,
|
||||
Qrev2,
|
||||
Qlog,
|
||||
|
@ -27,6 +28,7 @@ enum {
|
|||
static char *nametab[] = {
|
||||
"/",
|
||||
nil,
|
||||
"rev",
|
||||
"rev1",
|
||||
"rev2",
|
||||
"log",
|
||||
|
@ -182,6 +184,7 @@ fsmkqid(Qid *q, int level, void *aux)
|
|||
case Qchanges:
|
||||
q->type = QTDIR;
|
||||
if(0){
|
||||
case Qrev0:
|
||||
case Qrev1:
|
||||
case Qrev2:
|
||||
case Qlog:
|
||||
|
@ -237,6 +240,7 @@ fsmkdir(Dir *d, int level, void *aux)
|
|||
case Qroot:
|
||||
goto Namegen;
|
||||
case Qrev:
|
||||
case Qrev0:
|
||||
case Qrev1:
|
||||
case Qrev2:
|
||||
ri = aux;
|
||||
|
@ -638,6 +642,7 @@ fsread(Req *r)
|
|||
dirread9p(r, revgen, rf->info);
|
||||
respond(r, nil);
|
||||
return;
|
||||
case Qrev0:
|
||||
case Qrev1:
|
||||
case Qrev2:
|
||||
s = nil;
|
||||
|
@ -646,7 +651,7 @@ fsread(Req *r)
|
|||
i = hashrev(&changelog, rf->info->chash);
|
||||
if(rf->level == Qrev1)
|
||||
i = changelog.map[i].p1rev;
|
||||
else
|
||||
else if(rf->level == Qrev2)
|
||||
i = changelog.map[i].p2rev;
|
||||
Revgen:
|
||||
s = fsmkrevname(buf, sizeof(buf), i);
|
||||
|
|
Loading…
Reference in a new issue