1e77048c1StholoThis is cvsclient.info, produced by makeinfo version 4.0 from 2*43c1707eStholocvsclient.texi. 3f79d7d1bStholo 4e77048c1StholoINFO-DIR-SECTION Programming 5e77048c1StholoSTART-INFO-DIR-ENTRY 6e77048c1Stholo* cvsclient: (cvsclient). The CVS client/server protocol. 7e77048c1StholoEND-INFO-DIR-ENTRY 8e77048c1Stholo 9f79d7d1bStholo 10f79d7d1bStholoFile: cvsclient.info, Node: Top, Next: Introduction, Up: (dir) 11f79d7d1bStholo 12f79d7d1bStholoCVS Client/Server 13f79d7d1bStholo***************** 14f79d7d1bStholo 15f79d7d1bStholo This document describes the client/server protocol used by CVS. It 16f79d7d1bStholodoes not describe how to use or administer client/server CVS; see the 17*43c1707eStholoregular CVS manual for that. This is version 1.11.1p1 of the protocol 18f79d7d1bStholospecification--*Note Introduction::, for more on what this version 19f79d7d1bStholonumber means. 20f79d7d1bStholo 21f79d7d1bStholo* Menu: 22f79d7d1bStholo 23f79d7d1bStholo* Introduction:: What is CVS and what is the client/server protocol for? 24f79d7d1bStholo* Goals:: Basic design decisions, requirements, scope, etc. 25f79d7d1bStholo* Connection and Authentication:: Various ways to connect to the server 26f79d7d1bStholo* Password scrambling:: Scrambling used by pserver 27f79d7d1bStholo* Protocol:: Complete description of the protocol 28f79d7d1bStholo* Protocol Notes:: Possible enhancements, limitations, etc. of the protocol 29f79d7d1bStholo 30f79d7d1bStholo 31f79d7d1bStholoFile: cvsclient.info, Node: Introduction, Next: Goals, Prev: Top, Up: Top 32f79d7d1bStholo 33f79d7d1bStholoIntroduction 34f79d7d1bStholo************ 35f79d7d1bStholo 36f79d7d1bStholo CVS is a version control system (with some additional configuration 37f79d7d1bStholomanagement functionality). It maintains a central "repository" which 38f79d7d1bStholostores files (often source code), including past versions, information 39f79d7d1bStholoabout who modified them and when, and so on. People who wish to look 40f79d7d1bStholoat or modify those files, known as "developers", use CVS to "check out" 41f79d7d1bStholoa "working directory" from the repository, to "check in" new versions 42f79d7d1bStholoof files to the repository, and other operations such as viewing the 43f79d7d1bStholomodification history of a file. If developers are connected to the 44f79d7d1bStholorepository by a network, particularly a slow or flaky one, the most 45f79d7d1bStholoefficient way to use the network is with the CVS-specific protocol 46f79d7d1bStholodescribed in this document. 47f79d7d1bStholo 48f79d7d1bStholo Developers, using the machine on which they store their working 49f79d7d1bStholodirectory, run the CVS "client" program. To perform operations which 50f79d7d1bStholocannot be done locally, it connects to the CVS "server" program, which 51f79d7d1bStholomaintains the repository. For more information on how to connect see 52f79d7d1bStholo*Note Connection and Authentication::. 53f79d7d1bStholo 54f79d7d1bStholo This document describes the CVS protocol. Unfortunately, it does not 55f79d7d1bStholoyet completely document one aspect of the protocol--the detailed 56f79d7d1bStholooperation of each CVS command and option--and one must look at the CVS 57f79d7d1bStholouser documentation, `cvs.texinfo', for that information. The protocol 58f79d7d1bStholois non-proprietary (anyone who wants to is encouraged to implement it) 59f79d7d1bStholoand an implementation, known as CVS, is available under the GNU Public 60f79d7d1bStholoLicense. The CVS distribution, containing this implementation, 61f79d7d1bStholo`cvs.texinfo', and a copy (possibly more or less up to date than what 62f79d7d1bStholoyou are reading now) of this document, `cvsclient.texi', can be found 63f79d7d1bStholoat the usual GNU FTP sites, with a filename such as 64f79d7d1bStholo`cvs-VERSION.tar.gz'. 65f79d7d1bStholo 66*43c1707eStholo This is version 1.11.1p1 of the protocol specification. This 67*43c1707eStholoversion number is intended only to aid in distinguishing different 68*43c1707eStholoversions of this specification. Although the specification is currently 69*43c1707eStholomaintained in conjunction with the CVS implementation, and carries the 70*43c1707eStholosame version number, it also intends to document what is involved with 71f79d7d1bStholointeroperating with other implementations (such as other versions of 72f79d7d1bStholoCVS); see *Note Requirements::. This version number should not be used 73f79d7d1bStholoby clients or servers to determine what variant of the protocol to 74f79d7d1bStholospeak; they should instead use the `valid-requests' and 75e77048c1Stholo`Valid-responses' mechanism (*note Protocol::), which is more flexible. 76f79d7d1bStholo 77f79d7d1bStholo 78f79d7d1bStholoFile: cvsclient.info, Node: Goals, Next: Connection and Authentication, Prev: Introduction, Up: Top 79f79d7d1bStholo 80f79d7d1bStholoGoals 81f79d7d1bStholo***** 82f79d7d1bStholo 83f79d7d1bStholo * Do not assume any access to the repository other than via this 84f79d7d1bStholo protocol. It does not depend on NFS, rdist, etc. 85f79d7d1bStholo 86f79d7d1bStholo * Providing a reliable transport is outside this protocol. The 87f79d7d1bStholo protocol expects a reliable transport that is transparent (that 88f79d7d1bStholo is, there is no translation of characters, including characters 89f79d7d1bStholo such as such as linefeeds or carriage returns), and can transmit 90f79d7d1bStholo all 256 octets (for example for proper handling of binary files, 91f79d7d1bStholo compression, and encryption). The encoding of characters 92f79d7d1bStholo specified by the protocol (the names of requests and so on) is the 93f79d7d1bStholo invariant ISO 646 character set (a subset of most popular 94f79d7d1bStholo character sets including ASCII and others). For more details on 95f79d7d1bStholo running the protocol over the TCP reliable transport, see *Note 96f79d7d1bStholo Connection and Authentication::. 97f79d7d1bStholo 98f79d7d1bStholo * Security and authentication are handled outside this protocol (but 99f79d7d1bStholo see below about `cvs kserver' and `cvs pserver'). 100f79d7d1bStholo 101f79d7d1bStholo * The protocol makes it possible for updates to be atomic with 102f79d7d1bStholo respect to checkins; that is if someone commits changes to several 103f79d7d1bStholo files in one cvs command, then an update by someone else would 104f79d7d1bStholo either get all the changes, or none of them. The current CVS 105f79d7d1bStholo server can't do this, but that isn't the protocol's fault. 106f79d7d1bStholo 107f79d7d1bStholo * The protocol is, with a few exceptions, transaction-based. That 108f79d7d1bStholo is, the client sends all its requests (without waiting for server 109f79d7d1bStholo responses), and then waits for the server to send back all 110f79d7d1bStholo responses (without waiting for further client requests). This has 111f79d7d1bStholo the advantage of minimizing network turnarounds and the 112f79d7d1bStholo disadvantage of sometimes transferring more data than would be 113f79d7d1bStholo necessary if there were a richer interaction. Another, more 114f79d7d1bStholo subtle, advantage is that there is no need for the protocol to 115f79d7d1bStholo provide locking for features such as making checkins atomic with 116f79d7d1bStholo respect to updates. Any such locking can be handled entirely by 117f79d7d1bStholo the server. A good server implementation (such as the current CVS 118f79d7d1bStholo server) will make sure that it does not have any such locks in 119f79d7d1bStholo place whenever it is waiting for communication with the client; 120f79d7d1bStholo this prevents one client on a slow or flaky network from 121f79d7d1bStholo interfering with the work of others. 122f79d7d1bStholo 123f79d7d1bStholo * It is a general design goal to provide only one way to do a given 124f79d7d1bStholo operation (where possible). For example, implementations have no 125f79d7d1bStholo choice about whether to terminate lines with linefeeds or some 126f79d7d1bStholo other character(s), and request and response names are 127f79d7d1bStholo case-sensitive. This is to enhance interoperability. If a 128f79d7d1bStholo protocol allows more than one way to do something, it is all too 129f79d7d1bStholo easy for some implementations to support only some of them 130f79d7d1bStholo (perhaps accidentally). 131f79d7d1bStholo 132f79d7d1bStholo 133f79d7d1bStholoFile: cvsclient.info, Node: Connection and Authentication, Next: Password scrambling, Prev: Goals, Up: Top 134f79d7d1bStholo 135f79d7d1bStholoHow to Connect to and Authenticate Oneself to the CVS server 136f79d7d1bStholo************************************************************ 137f79d7d1bStholo 138f79d7d1bStholo Connection and authentication occurs before the CVS protocol itself 139f79d7d1bStholois started. There are several ways to connect. 140f79d7d1bStholo 141f79d7d1bStholoserver 142f79d7d1bStholo If the client has a way to execute commands on the server, and 143f79d7d1bStholo provide input to the commands and output from them, then it can 144f79d7d1bStholo connect that way. This could be the usual rsh (port 514) 145f79d7d1bStholo protocol, Kerberos rsh, SSH, or any similar mechanism. The client 146f79d7d1bStholo may allow the user to specify the name of the server program; the 147f79d7d1bStholo default is `cvs'. It is invoked with one argument, `server'. 148f79d7d1bStholo Once it invokes the server, the client proceeds to start the cvs 149f79d7d1bStholo protocol. 150f79d7d1bStholo 151f79d7d1bStholokserver 152f79d7d1bStholo The kerberized server listens on a port (in the current 153f79d7d1bStholo implementation, by having inetd call "cvs kserver") which defaults 154f79d7d1bStholo to 1999. The client connects, sends the usual kerberos 155f79d7d1bStholo authentication information, and then starts the cvs protocol. 156f79d7d1bStholo Note: port 1999 is officially registered for another use, and in 157f79d7d1bStholo any event one cannot register more than one port for CVS, so 158f79d7d1bStholo GSS-API (see below) is recommended instead of kserver as a way to 159f79d7d1bStholo support kerberos. 160f79d7d1bStholo 161f79d7d1bStholopserver 162f79d7d1bStholo The name "pserver" is somewhat confusing. It refers to both a 163f79d7d1bStholo generic framework which allows the CVS protocol to support several 164f79d7d1bStholo authentication mechanisms, and a name for a specific mechanism 165f79d7d1bStholo which transfers a username and a cleartext password. Servers need 166f79d7d1bStholo not support all mechanisms, and in fact servers will typically 167f79d7d1bStholo want to support only those mechanisms which meet the relevant 168f79d7d1bStholo security needs. 169f79d7d1bStholo 170f79d7d1bStholo The pserver server listens on a port (in the current 171f79d7d1bStholo implementation, by having inetd call "cvs pserver") which defaults 172f79d7d1bStholo to 2401 (this port is officially registered). The client 173f79d7d1bStholo connects, and sends the following: 174f79d7d1bStholo 175f79d7d1bStholo * the string `BEGIN AUTH REQUEST', a linefeed, 176f79d7d1bStholo 177f79d7d1bStholo * the cvs root, a linefeed, 178f79d7d1bStholo 179f79d7d1bStholo * the username, a linefeed, 180f79d7d1bStholo 181f79d7d1bStholo * the password trivially encoded (see *Note Password 182f79d7d1bStholo scrambling::), a linefeed, 183f79d7d1bStholo 184f79d7d1bStholo * the string `END AUTH REQUEST', and a linefeed. 185f79d7d1bStholo 186f79d7d1bStholo The client must send the identical string for cvs root both here 187f79d7d1bStholo and later in the `Root' request of the cvs protocol itself. 188f79d7d1bStholo Servers are encouraged to enforce this restriction. The possible 189f79d7d1bStholo server responses (each of which is followed by a linefeed) are the 190f79d7d1bStholo following. Note that although there is a small similarity between 191f79d7d1bStholo this authentication protocol and the cvs protocol, they are 192f79d7d1bStholo separate. 193f79d7d1bStholo 194f79d7d1bStholo `I LOVE YOU' 195f79d7d1bStholo The authentication is successful. The client proceeds with 196f79d7d1bStholo the cvs protocol itself. 197f79d7d1bStholo 198f79d7d1bStholo `I HATE YOU' 199f79d7d1bStholo The authentication fails. After sending this response, the 200f79d7d1bStholo server may close the connection. It is up to the server to 201f79d7d1bStholo decide whether to give this response, which is generic, or a 202f79d7d1bStholo more specific response using `E' and/or `error'. 203f79d7d1bStholo 204f79d7d1bStholo `E TEXT' 205f79d7d1bStholo Provide a message for the user. After this reponse, the 206f79d7d1bStholo authentication protocol continues with another response. 207f79d7d1bStholo Typically the server will provide a series of `E' responses 208f79d7d1bStholo followed by `error'. Compatibility note: CVS 1.9.10 and 209f79d7d1bStholo older clients will print `unrecognized auth response' and 210f79d7d1bStholo TEXT, and then exit, upon receiving this response. 211f79d7d1bStholo 212f79d7d1bStholo `error CODE TEXT' 213f79d7d1bStholo The authentication fails. After sending this response, the 214f79d7d1bStholo server may close the connection. The CODE is a code 215f79d7d1bStholo describing why it failed, intended for computer consumption. 216f79d7d1bStholo The only code currently defined is `0' which is nonspecific, 217f79d7d1bStholo but clients must silently treat any unrecognized codes as 218f79d7d1bStholo nonspecific. The TEXT should be supplied to the user. 219f79d7d1bStholo Compatibility note: CVS 1.9.10 and older clients will print 220f79d7d1bStholo `unrecognized auth response' and TEXT, and then exit, upon 2212f9d2fd9Stholo receiving this response. Note that TEXT for this response, 2222f9d2fd9Stholo or the TEXT in an `E' response, is not designed for machine 2232f9d2fd9Stholo parsing. More vigorous use of CODE, or future extensions, 2242f9d2fd9Stholo will be needed to prove a cleaner machine-parseable 2252f9d2fd9Stholo indication of what the error was. 226f79d7d1bStholo 227f79d7d1bStholo If the client wishes to merely authenticate without starting the 228f79d7d1bStholo cvs protocol, the procedure is the same, except BEGIN AUTH REQUEST 229f79d7d1bStholo is replaced with BEGIN VERIFICATION REQUEST, END AUTH REQUEST is 230f79d7d1bStholo replaced with END VERIFICATION REQUEST, and upon receipt of I LOVE 231f79d7d1bStholo YOU the connection is closed rather than continuing. 232f79d7d1bStholo 233f79d7d1bStholo Another mechanism is GSSAPI authentication. GSSAPI is a generic 234f79d7d1bStholo interface to security services such as kerberos. GSSAPI is 235f79d7d1bStholo specified in RFC2078 (GSSAPI version 2) and RFC1508 (GSSAPI 236f79d7d1bStholo version 1); we are not aware of differences between the two which 237f79d7d1bStholo affect the protocol in incompatible ways, so we make no attempt to 238f79d7d1bStholo specify one version or the other. The procedure here is to start 239f79d7d1bStholo with `BEGIN GSSAPI REQUEST'. GSSAPI authentication information is 240f79d7d1bStholo then exchanged between the client and the server. Each packet of 241f79d7d1bStholo information consists of a two byte big endian length, followed by 242f79d7d1bStholo that many bytes of data. After the GSSAPI authentication is 243f79d7d1bStholo complete, the server continues with the responses described above 244f79d7d1bStholo (`I LOVE YOU', etc.). 245f79d7d1bStholo 246f79d7d1bStholofuture possibilities 247f79d7d1bStholo There are a nearly unlimited number of ways to connect and 248f79d7d1bStholo authenticate. One might want to allow access based on IP address 249f79d7d1bStholo (similar to the usual rsh protocol but with different/no 250f79d7d1bStholo restrictions on ports < 1024), to adopt mechanisms such as 251f79d7d1bStholo Pluggable Authentication Modules (PAM), to allow users to run 252f79d7d1bStholo their own servers under their own usernames without root access, 253f79d7d1bStholo or any number of other possibilities. The way to add future 254f79d7d1bStholo mechanisms, for the most part, should be to continue to use port 255f79d7d1bStholo 2401, but to use different strings in place of `BEGIN AUTH 256f79d7d1bStholo REQUEST'. 257f79d7d1bStholo 258f79d7d1bStholo 259f79d7d1bStholoFile: cvsclient.info, Node: Password scrambling, Next: Protocol, Prev: Connection and Authentication, Up: Top 260f79d7d1bStholo 261f79d7d1bStholoPassword scrambling algorithm 262f79d7d1bStholo***************************** 263f79d7d1bStholo 264f79d7d1bStholo The pserver authentication protocol, as described in *Note 265f79d7d1bStholoConnection and Authentication::, trivially encodes the passwords. This 266f79d7d1bStholois only to prevent inadvertent compromise; it provides no protection 267f79d7d1bStholoagainst even a relatively unsophisticated attacker. For comparison, 268f79d7d1bStholoHTTP Basic Authentication (as described in RFC2068) uses BASE64 for a 269f79d7d1bStholosimilar purpose. CVS uses its own algorithm, described here. 270f79d7d1bStholo 271f79d7d1bStholo The scrambled password starts with `A', which serves to identify the 272f79d7d1bStholoscrambling algorithm in use. After that follows a single octet for 273f79d7d1bStholoeach character in the password, according to a fixed encoding. The 274f79d7d1bStholovalues are shown here, with the encoded values in decimal. Control 275f79d7d1bStholocharacters, space, and characters outside the invariant ISO 646 276f79d7d1bStholocharacter set are not shown; such characters are not recommended for use 277f79d7d1bStholoin passwords. There is a long discussion of character set issues in 278f79d7d1bStholo*Note Protocol Notes::. 279f79d7d1bStholo 280f79d7d1bStholo 0 111 P 125 p 58 281f79d7d1bStholo ! 120 1 52 A 57 Q 55 a 121 q 113 282f79d7d1bStholo " 53 2 75 B 83 R 54 b 117 r 32 283f79d7d1bStholo 3 119 C 43 S 66 c 104 s 90 284f79d7d1bStholo 4 49 D 46 T 124 d 101 t 44 285f79d7d1bStholo % 109 5 34 E 102 U 126 e 100 u 98 286f79d7d1bStholo & 72 6 82 F 40 V 59 f 69 v 60 287f79d7d1bStholo ' 108 7 81 G 89 W 47 g 73 w 51 288f79d7d1bStholo ( 70 8 95 H 38 X 92 h 99 x 33 289f79d7d1bStholo ) 64 9 65 I 103 Y 71 i 63 y 97 290f79d7d1bStholo * 76 : 112 J 45 Z 115 j 94 z 62 291f79d7d1bStholo + 67 ; 86 K 50 k 93 292f79d7d1bStholo , 116 < 118 L 42 l 39 293f79d7d1bStholo - 74 = 110 M 123 m 37 294f79d7d1bStholo . 68 > 122 N 91 n 61 295f79d7d1bStholo / 87 ? 105 O 35 _ 56 o 48 296f79d7d1bStholo 297f79d7d1bStholo 298f79d7d1bStholoFile: cvsclient.info, Node: Protocol, Next: Protocol Notes, Prev: Password scrambling, Up: Top 299f79d7d1bStholo 300f79d7d1bStholoThe CVS client/server protocol 301f79d7d1bStholo****************************** 302f79d7d1bStholo 303f79d7d1bStholo In the following, `\n' refers to a linefeed and `\t' refers to a 304f79d7d1bStholohorizontal tab; "requests" are what the client sends and "responses" 305f79d7d1bStholoare what the server sends. In general, the connection is governed by 306f79d7d1bStholothe client--the server does not send responses without first receiving 307f79d7d1bStholorequests to do so; see *Note Response intro:: for more details of this 308f79d7d1bStholoconvention. 309f79d7d1bStholo 310f79d7d1bStholo It is typical, early in the connection, for the client to transmit a 311f79d7d1bStholo`Valid-responses' request, containing all the responses it supports, 312f79d7d1bStholofollowed by a `valid-requests' request, which elicits from the server a 313f79d7d1bStholo`Valid-requests' response containing all the requests it understands. 314f79d7d1bStholoIn this way, the client and server each find out what the other 315f79d7d1bStholosupports before exchanging large amounts of data (such as file 316f79d7d1bStholocontents). 317f79d7d1bStholo 318f79d7d1bStholo* Menu: 319f79d7d1bStholo 320f79d7d1bStholo 321f79d7d1bStholoGeneral protocol conventions: 322f79d7d1bStholo 323f79d7d1bStholo* Entries Lines:: Transmitting RCS data 324f79d7d1bStholo* File Modes:: Read, write, execute, and possibly more... 325f79d7d1bStholo* Filenames:: Conventions regarding filenames 326f79d7d1bStholo* File transmissions:: How file contents are transmitted 327f79d7d1bStholo* Strings:: Strings in various requests and responses 3286407bc5bStholo* Dates:: Times and dates 329f79d7d1bStholo 330f79d7d1bStholoThe protocol itself: 331f79d7d1bStholo 332f79d7d1bStholo* Request intro:: General conventions relating to requests 333f79d7d1bStholo* Requests:: List of requests 334f79d7d1bStholo* Response intro:: General conventions relating to responses 335f79d7d1bStholo* Response pathnames:: The "pathname" in responses 336f79d7d1bStholo* Responses:: List of responses 337f79d7d1bStholo* Text tags:: More details about the MT response 338f79d7d1bStholo 339f79d7d1bStholoAn example session, and some further observations: 340f79d7d1bStholo 341f79d7d1bStholo* Example:: A conversation between client and server 342f79d7d1bStholo* Requirements:: Things not to omit from an implementation 343f79d7d1bStholo* Obsolete:: Former protocol features 344f79d7d1bStholo 345f79d7d1bStholo 346f79d7d1bStholoFile: cvsclient.info, Node: Entries Lines, Next: File Modes, Up: Protocol 347f79d7d1bStholo 348f79d7d1bStholoEntries Lines 349f79d7d1bStholo============= 350f79d7d1bStholo 351f79d7d1bStholo Entries lines are transmitted as: 352f79d7d1bStholo 353f79d7d1bStholo / NAME / VERSION / CONFLICT / OPTIONS / TAG_OR_DATE 354f79d7d1bStholo 355f79d7d1bStholo TAG_OR_DATE is either `T' TAG or `D' DATE or empty. If it is 356f79d7d1bStholofollowed by a slash, anything after the slash shall be silently ignored. 357f79d7d1bStholo 358f79d7d1bStholo VERSION can be empty, or start with `0' or `-', for no user file, 359f79d7d1bStholonew user file, or user file to be removed, respectively. 360f79d7d1bStholo 361f79d7d1bStholo CONFLICT, if it starts with `+', indicates that the file had 362f79d7d1bStholoconflicts in it. The rest of CONFLICT is `=' if the timestamp matches 363f79d7d1bStholothe file, or anything else if it doesn't. If CONFLICT does not start 364f79d7d1bStholowith a `+', it is silently ignored. 365f79d7d1bStholo 366f79d7d1bStholo OPTIONS signifies the keyword expansion options (for example `-ko'). 367f79d7d1bStholoIn an `Entry' request, this indicates the options that were specified 368f79d7d1bStholowith the file from the previous file updating response (*note Response 369e77048c1Stholointro::, for a list of file updating responses); if the client is 370f79d7d1bStholospecifying the `-k' or `-A' option to `update', then it is the server 371f79d7d1bStholowhich figures out what overrides what. 372f79d7d1bStholo 373f79d7d1bStholo 374f79d7d1bStholoFile: cvsclient.info, Node: File Modes, Next: Filenames, Prev: Entries Lines, Up: Protocol 375f79d7d1bStholo 376f79d7d1bStholoFile Modes 377f79d7d1bStholo========== 378f79d7d1bStholo 379f79d7d1bStholo A mode is any number of repetitions of 380f79d7d1bStholo 381f79d7d1bStholo MODE-TYPE = DATA 382f79d7d1bStholo 383f79d7d1bStholo separated by `,'. 384f79d7d1bStholo 385f79d7d1bStholo MODE-TYPE is an identifier composed of alphanumeric characters. 386f79d7d1bStholoCurrently specified: `u' for user, `g' for group, `o' for other (see 387f79d7d1bStholobelow for discussion of whether these have their POSIX meaning or are 388f79d7d1bStholomore loose). Unrecognized values of MODE-TYPE are silently ignored. 389f79d7d1bStholo 390f79d7d1bStholo DATA consists of any data not containing `,', `\0' or `\n'. For 391f79d7d1bStholo`u', `g', and `o' mode types, data consists of alphanumeric characters, 392f79d7d1bStholowhere `r' means read, `w' means write, `x' means execute, and 393f79d7d1bStholounrecognized letters are silently ignored. 394f79d7d1bStholo 395f79d7d1bStholo The two most obvious ways in which the mode matters are: (1) is it 396f79d7d1bStholowriteable? This is used by the developer communication features, and 397f79d7d1bStholois implemented even on OS/2 (and could be implemented on DOS), whose 398f79d7d1bStholonotion of mode is limited to a readonly bit. (2) is it executable? 399f79d7d1bStholoUnix CVS users need CVS to store this setting (for shell scripts and 400f79d7d1bStholothe like). The current CVS implementation on unix does a little bit 401f79d7d1bStholomore than just maintain these two settings, but it doesn't really have 402f79d7d1bStholoa nice general facility to store or version control the mode, even on 403f79d7d1bStholounix, much less across operating systems with diverse protection 404f79d7d1bStholofeatures. So all the ins and outs of what the mode means across 405f79d7d1bStholooperating systems haven't really been worked out (e.g. should the VMS 406f79d7d1bStholoport use ACLs to get POSIX semantics for groups?). 407f79d7d1bStholo 408f79d7d1bStholo 409f79d7d1bStholoFile: cvsclient.info, Node: Filenames, Next: File transmissions, Prev: File Modes, Up: Protocol 410f79d7d1bStholo 411f79d7d1bStholoConventions regarding transmission of file names 412f79d7d1bStholo================================================ 413f79d7d1bStholo 414f79d7d1bStholo In most contexts, `/' is used to separate directory and file names 415f79d7d1bStholoin filenames, and any use of other conventions (for example, that the 416f79d7d1bStholouser might type on the command line) is converted to that form. The 417f79d7d1bStholoonly exceptions might be a few cases in which the server provides a 418f79d7d1bStholomagic cookie which the client then repeats verbatim, but as the server 419f79d7d1bStholohas not yet been ported beyond unix, the two rules provide the same 420f79d7d1bStholoanswer (and what to do if future server ports are operating on a 421f79d7d1bStholorepository like e:/foo or CVS_ROOT:[FOO.BAR] has not been carefully 422f79d7d1bStholothought out). 423f79d7d1bStholo 424f79d7d1bStholo Characters outside the invariant ISO 646 character set should be 425f79d7d1bStholoavoided in filenames. This restriction may need to be relaxed to allow 426f79d7d1bStholofor characters such as `[' and `]' (see above about non-unix servers); 427f79d7d1bStholothis has not been carefully considered (and currently implementations 428f79d7d1bStholoprobably use whatever character sets that the operating systems they 429f79d7d1bStholoare running on allow, and/or that users specify). Of course the most 430f79d7d1bStholoportable practice is to restrict oneself further, to the POSIX portable 431f79d7d1bStholofilename character set as specified in POSIX.1. 432f79d7d1bStholo 433f79d7d1bStholo 434f79d7d1bStholoFile: cvsclient.info, Node: File transmissions, Next: Strings, Prev: Filenames, Up: Protocol 435f79d7d1bStholo 436f79d7d1bStholoFile transmissions 437f79d7d1bStholo================== 438f79d7d1bStholo 439f79d7d1bStholo File contents (noted below as FILE TRANSMISSION) can be sent in one 440f79d7d1bStholoof two forms. The simpler form is a number of bytes, followed by a 441f79d7d1bSthololinefeed, followed by the specified number of bytes of file contents. 442f79d7d1bStholoThese are the entire contents of the specified file. Second, if both 443f79d7d1bStholoclient and server support `gzip-file-contents', a `z' may precede the 444f79d7d1bSthololength, and the `file contents' sent are actually compressed with 445f79d7d1bStholo`gzip' (RFC1952/1951) compression. The length specified is that of the 446f79d7d1bStholocompressed version of the file. 447f79d7d1bStholo 448f79d7d1bStholo In neither case are the file content followed by any additional data. 449f79d7d1bStholoThe transmission of a file will end with a linefeed iff that file (or 450f79d7d1bStholoits compressed form) ends with a linefeed. 451f79d7d1bStholo 452f79d7d1bStholo The encoding of file contents depends on the value for the `-k' 453f79d7d1bStholooption. If the file is binary (as specified by the `-kb' option in the 454f79d7d1bStholoappropriate place), then it is just a certain number of octets, and the 455f79d7d1bStholoprotocol contributes nothing towards determining the encoding (using 456f79d7d1bStholothe file name is one widespread, if not universally popular, mechanism). 457f79d7d1bStholoIf the file is text (not binary), then the file is sent as a series of 458f79d7d1bSthololines, separated by linefeeds. If the keyword expansion is set to 459f79d7d1bStholosomething other than `-ko', then it is expected that the file conform 460f79d7d1bStholoto the RCS expectations regarding keyword expansion--in particular, 461f79d7d1bStholothat it is in a character set such as ASCII in which 0x24 is a dollar 462f79d7d1bStholosign (`$'). 463f79d7d1bStholo 464f79d7d1bStholo 4656407bc5bStholoFile: cvsclient.info, Node: Strings, Next: Dates, Prev: File transmissions, Up: Protocol 466f79d7d1bStholo 467f79d7d1bStholoStrings 468f79d7d1bStholo======= 469f79d7d1bStholo 470f79d7d1bStholo In various contexts, for example the `Argument' request and the `M' 471f79d7d1bStholoresponse, one transmits what is essentially an arbitrary string. Often 472f79d7d1bStholothis will have been supplied by the user (for example, the `-m' option 473f79d7d1bStholoto the `ci' request). The protocol has no mechanism to specify the 474f79d7d1bStholocharacter set of such strings; it would be fairly safe to stick to the 475f79d7d1bStholoinvariant ISO 646 character set but the existing practice is probably 476f79d7d1bStholoto just transmit whatever the user specifies, and hope that everyone 477f79d7d1bStholoinvolved agrees which character set is in use, or sticks to a common 478f79d7d1bStholosubset. 479f79d7d1bStholo 480f79d7d1bStholo 4816407bc5bStholoFile: cvsclient.info, Node: Dates, Next: Request intro, Prev: Strings, Up: Protocol 4826407bc5bStholo 4836407bc5bStholoDates 4846407bc5bStholo===== 4856407bc5bStholo 4866407bc5bStholo The protocol contains times and dates in various places. 4876407bc5bStholo 4886407bc5bStholo For the `-D' option to the `annotate', `co', `diff', `export', 489*43c1707eStholo`history', `rannotate', `rdiff', `rtag', `tag', and `update' requests, 490*43c1707eStholothe server should support two formats: 4916407bc5bStholo 4928506102dStholo 26 May 1997 13:01:40 -0000 ; RFC 822 as modified by RFC 1123 4936407bc5bStholo 5/26/1997 13:01:40 GMT ; traditional 4946407bc5bStholo 4956407bc5bStholo The former format is preferred; the latter however is sent by the CVS 4966407bc5bStholocommand line client (versions 1.5 through at least 1.9). 4976407bc5bStholo 498*43c1707eStholo For the `-d' option to the `log' and `rlog' requests, servers should 499*43c1707eStholoat least support RFC 822/1123 format. Clients are encouraged to use 500*43c1707eStholothis format too (the command line CVS client, version 1.10 and older, 501*43c1707eStholojust passed along the date format specified by the user, however). 5026407bc5bStholo 5038506102dStholo The `Mod-time' response and `Checkin-time' request use RFC 822/1123 5048506102dStholoformat (see the descriptions of that response and request for details). 5056407bc5bStholo 5066407bc5bStholo For `Notify', see the description of that request. 5076407bc5bStholo 5086407bc5bStholo 5096407bc5bStholoFile: cvsclient.info, Node: Request intro, Next: Requests, Prev: Dates, Up: Protocol 510f79d7d1bStholo 511f79d7d1bStholoRequest intro 512f79d7d1bStholo============= 513f79d7d1bStholo 514f79d7d1bStholo By convention, requests which begin with a capital letter do not 515f79d7d1bStholoelicit a response from the server, while all others do - save one. The 516f79d7d1bStholoexception is `gzip-file-contents'. Unrecognized requests will always 517f79d7d1bStholoelicit a response from the server, even if that request begins with a 518f79d7d1bStholocapital letter. 519f79d7d1bStholo 5202f9d2fd9Stholo The term "command" means a request which expects a response (except 5212f9d2fd9Stholo`valid-requests'). The general model is that the client transmits a 5222f9d2fd9Sthologreat number of requests, but nothing happens until the very end when 5232f9d2fd9Stholothe client transmits a command. Although the intention is that 5242f9d2fd9Stholotransmitting several commands in one connection should be legal, 5252f9d2fd9Stholoexisting servers probably have some bugs with some combinations of more 5262f9d2fd9Stholothan one command, and so clients may find it necessary to make several 5272f9d2fd9Stholoconnections in some cases. This should be thought of as a workaround 5282f9d2fd9Stholorather than a desired attribute of the protocol. 5292f9d2fd9Stholo 530