FileserverProtocol

The CVSNT Fileserver Protocol

  1. Initialisation
  2. Browsing

This is the protocol at the core of the CVSNT Enterprise Server. It provides a common link to different types of repository which are accessed by higher level protocols to perform version control/document control procedures.

All client communication is assumed to be in UTF-8.

This is a work in progress and not to be treated as definitive until release

1. Initialisation

Upon connect the server identifies itself as follows:

  CVSNT Fileserver 1.0

The client identifies it to the fileserver using the following command:

  Client { version=1.0; hostname=<host>; descriptionn=<description>; }

And the server gives one of the following replies

   { resultcode=0; resulttext=OK; read_write=1; }
   { resultcode=0; resulttext=OK; read_write=0; }
   { resultcode=1; resulttext=Client version not supported; }

2. Browsing

Listing files in the repository is done as follows:

   LS { date=<date>; tag=<tag>; version=<version>; path=<path>; } 

The response is as follows:

   { resultcode=0; resulttext=OK; result_count=2}
   { file=foo.txt; creationdate=01-DEC-2003; modificationdate=03-DEC-2003; size=2342; tag=FOO; revision=1 }
   { file=bar.txt; creationdate=15-JUL-2003; modificationdate=03-JUL-2004; size=285348; tag=; revision=5 }

Getting file information is performed as follows:

  STAT { date=<date>; tag=<tag>; version=<version>; path=<path>; } 

The response is structured as follows:

    { resultcode=0; resulttext=OK; file=foo.txt; creationdate=01-JAN-2001; tags { foo=1; old_foo=2; } branches { baz; ban; } versions { 5 { author=tmh; date=01-03-02; description=checkin; } 4 { ... } } }

Note that atttributes are freeform, as the higher level version control systems will add them as required.

If a semicolon appears in an attribute, then it should be escaped with a backslash. All other escapes are at this time undefined, except '\\' which is defined to mean a literal backslash.

Whitespace between tags is not significant and is there for human readability only. Until the first '{' is closed newline is also considered to be whitespace, and any parser must take account of this.

To retrieve a file/revision use the following:

  GET { date=<date>; tag=<tag>; version=<version>; for_annotate; path=<path>; } 

The response will be:

   { resultcode=0; resulttext=0K; file=foo.txt; size=3554543; }
   ... literal file data ...

If the file is for annotation, and the backend storage system supports it, you get

   { resultcode=000; resulttext=OK; file=foo.txt; size=323234; lines=4344; annotation { 5=tmh; 1=fred; 43=tmh; 1=fred; 4300=tmh; }
   ... literal file data ...

The annotation block is the the number of lines affected, followed by the author name. The total number of lines should be equal to the number of lines in the file.

Use of for_annotate on a backend that doesn't support it will generate an error.

last edited 2004-02-09 19:10:16 by betty