# Class Parser.RCS

Inheritance graph

Description

  A RCS file parser that eats a RCS *,v file and presents nice pike data structures of its contents.

Variable access

  `array(string) Parser.RCS.access`

Description

  The usernames listed in the ACCESS section of the RCS file.

Variable branch

  `string|int(0..0) Parser.RCS.branch`

Description

  The default branch (or revision), if present, `0` otherwise.

Variable branches

  `mapping(string:string) Parser.RCS.branches`

Description

  Maps branch numbers (indices) to branch names (values).

Note

  The indices are short branch revision numbers (ie `"1.1.2"` and not `"1.1.0.2"`).

Variable comment

  `string|int(0..0) Parser.RCS.comment`

Description

  The RCS file comment if present, `0` otherwise.

Variable description

  `string Parser.RCS.description`

Description

  The RCS file description.

Variable expand

  `string Parser.RCS.expand`

Description

  The keyword expansion options (as named by RCS) if present, `0` otherwise.

Variable head

  `string Parser.RCS.head`

Description

  Version number of the head version of the file.

Inherit _RCS

  inherit Parser._RCS : _RCS

Variable locks

  `mapping(string:string) Parser.RCS.locks`

Description

  Maps from username to revision for users that have acquired locks on this file.

Variable rcs_file_name

  `string Parser.RCS.rcs_file_name`

Description

  The filename of the RCS file as sent to create().

Variable revisions

  `mapping(string:Revision) Parser.RCS.revisions`

Description

  Data for all revisions of the file. The indices of the mapping are the revision numbers, whereas the values are the data from the corresponding revision.

Variable strict_locks

  `bool Parser.RCS.strict_locks`

Description

  `1` if strict locking is set, `0` otherwise.

Variable tags

  `mapping(string:string) Parser.RCS.tags`

Description

  Maps tag names (indices) to tagged revision numbers (values).

Note

  This mapping typically contains raw revision numbers for branches (ie `"1.1.0.2"` and not `"1.1.2"`).

Variable trunk

  `array(Revision) Parser.RCS.trunk`

Description

  Data for all revisions on the trunk, sorted in the same order as the RCS file stored them - ie descending, most recent first, I'd assume (rcsfile(5), of course, fails to state such irrelevant information).

Method create

  `Parser.RCS Parser.RCS(string|void file_name, string|int(0..0)|void file_contents)`

Description

  Initializes the RCS object.

Parameter `file_name`

  The path to the raw RCS file (includes trailing ",v"). Used mainly for error reporting (truncated RCS file or similar). Stored in rcs_file_name.

Parameter `file_contents`

  If a string is provided, that string will be parsed to initialize the RCS object. If a zero (`0`) is sent, no initialization will be performed at all. If no value is given at all, but file_name was provided, that file will be loaded and parsed for object initialization.