[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: need help understanding underlying file format for cvs
From: |
Mark D. Baushke |
Subject: |
Re: need help understanding underlying file format for cvs |
Date: |
Sun, 09 Mar 2003 00:42:22 -0800 |
Ronald Petty <ron.petty@unigeek.com> writes:
> I am starting developing some repository surfing tools, I know plenty of
> them are out there and most use rlog or something like that to do it.
> In order to do what I want I need to know the underlying file format for
> the files. I want to list history/user/date/the actual file based on
> the select version etc.
> I see the file,v has most of this, and I have read man rcsfile and it
> gives the grammer for an rcs file. However I don't know if cvs uses
> this grammer for its file,v.
cvs should be upward compatible with RCS format. The only thing that is
an extension is the use of a 'magic branch number' which uses a '.0.' as
the second rightmost position in a version number (ie, 1.1.0.2 is a
'magic branch number'). See the cvs documentation at
http://www.cvshome.org/docs/manual/cvs_5.html#SEC59
for more details.
> So could someone tell me if this grammer is correct to develop a file
> parser/viewer.
>
> rcstext ::= admin {delta}* desc {deltatext}*
I believe that there must be one or more occurances of a {delta} element
in a cvs repository's representation of a ,v file. Likewise for the
deltatext being one or more occurances.
> admin ::= head {num};
> { branch {num}; }
> access {id}*;
> symbols {sym : num}*;
> locks {id : num}*; {strict ;}
> { comment {string}; }
> { expand {string}; }
> { newphrase }*
cvs does not use newphrase at the present time, but I think it may properly
ignore it...
> delta ::= num
> date num;
> author id;
> state {id};
> branches {num}*;
> next {num};
> { newphrase }*
>
> desc ::= desc string
>
> deltatext ::= num
> log string
> { newphrase }*
Likewise. I think the newphrase may be supported enough to ignore it...
> text string
>
> num ::= {digit | .}+
>
> digit ::= 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
>
> id ::= {num} idchar {idchar | num}*
>
> sym ::= {digit}* idchar {idchar | digit}*
I believe that sym may NOT start with a digit.
> idchar ::= any visible graphic character except special
>
> special ::= $ | , | . | : | ; | @
>
> string ::= @{any character, with @ doubled}*@
>
> newphrase ::= id word* ;
>
> word ::= id | num | string | :
>
>
> Thanks for the help.
> Ron
Well, it is late here and I may not have looked closely enough, but I
think you may have overlooked RCS keywords in the text. However, that is
not really a grammer so much as how to intrepret the string provided by
the expand keyword under your <admin> token.
Good luck,
-- Mark
- need help understanding underlying file format for cvs, Ronald Petty, 2003/03/08
- Re: need help understanding underlying file format for cvs,
Mark D. Baushke <=
- Re: need help understanding underlying file format for cvs, Larry Jones, 2003/03/09
- Re: need help understanding underlying file format for cvs, Ronald Petty, 2003/03/09
- Re: need help understanding underlying file format for cvs, Larry Jones, 2003/03/10
- Re: need help understanding underlying file format for cvs, Derek Robert Price, 2003/03/21
- Re: need help understanding underlying file format for cvs, Mark D. Baushke, 2003/03/21
- Re: need help understanding underlying file format for cvs, Shaun Tancheff, 2003/03/22