home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / cvs1107.zip / cvsclient.INF (.txt) < prev    next >
OS/2 Help File  |  2000-01-13  |  67KB  |  1,773 lines

  1.  
  2. ΓòÉΓòÉΓòÉ 1. CVS Client/Server ΓòÉΓòÉΓòÉ
  3.  
  4.  This document describes the client/server protocol used by CVS.  It does not 
  5.  describe how to use or administer client/server CVS; see the regular CVS 
  6.  manual for that.  This is version 1.10.7 of the protocol specification---See 
  7.  Introduction, for more on what this version number means. 
  8.  
  9.  Introduction                  What is CVS and what is the client/server 
  10.                                protocol for? 
  11.  Goals                         Basic design decisions, requirements, scope, 
  12.                                etc. 
  13.  Connection and Authentication Various ways to connect to the server 
  14.  Password scrambling           Scrambling used by pserver 
  15.  Protocol                      Complete description of the protocol 
  16.  Protocol Notes                Possible enhancements, limitations, etc. of the 
  17.                                protocol 
  18.  
  19.  
  20. ΓòÉΓòÉΓòÉ 2. Introduction ΓòÉΓòÉΓòÉ
  21.  
  22.  CVS is a version control system (with some additional configuration management 
  23.  functionality).  It maintains a central repository which stores files (often 
  24.  source code), including past versions, information about who modified them and 
  25.  when, and so on.  People who wish to look at or modify those files, known as 
  26.  developers, use CVS to check out a working directory from the repository, to 
  27.  check in new versions of files to the repository, and other operations such as 
  28.  viewing the modification history of a file.  If developers are connected to 
  29.  the repository by a network, particularly a slow or flaky one, the most 
  30.  efficient way to use the network is with the CVS-specific protocol described 
  31.  in this document. 
  32.  
  33.  Developers, using the machine on which they store their working directory, run 
  34.  the CVS client program.  To perform operations which cannot be done locally, 
  35.  it connects to the CVS server program, which maintains the repository.  For 
  36.  more information on how to connect see Connection and Authentication. 
  37.  
  38.  This document describes the CVS protocol.  Unfortunately, it does not yet 
  39.  completely document one aspect of the protocol---the detailed operation of 
  40.  each CVS command and option---and one must look at the CVS user documentation, 
  41.  'cvs.texinfo', for that information.  The protocol is non-proprietary (anyone 
  42.  who wants to is encouraged to implement it) and an implementation, known as 
  43.  CVS, is available under the GNU Public License.  The CVS distribution, 
  44.  containing this implementation, 'cvs.texinfo', and a copy (possibly more or 
  45.  less up to date than what you are reading now) of this document, 
  46.  'cvsclient.texi', can be found at the usual GNU FTP sites, with a filename 
  47.  such as 'cvs-version.tar.gz'. 
  48.  
  49.  This is version 1.10.7 of the protocol specification.  This version number is 
  50.  intended only to aid in distinguishing different versions of this 
  51.  specification.  Although the specification is currently maintained in 
  52.  conjunction with the CVS implementation, and carries the same version number, 
  53.  it also intends to document what is involved with interoperating with other 
  54.  implementations (such as other versions of CVS); see Requirements.  This 
  55.  version number should not be used by clients or servers to determine what 
  56.  variant of the protocol to speak; they should instead use the valid-requests 
  57.  and Valid-responses mechanism (see Protocol), which is more flexible. 
  58.  
  59.  
  60. ΓòÉΓòÉΓòÉ 3. Goals ΓòÉΓòÉΓòÉ
  61.  
  62.      Do not assume any access to the repository other than via this protocol. 
  63.       It does not depend on NFS, rdist, etc. 
  64.  
  65.      Providing a reliable transport is outside this protocol.  The protocol 
  66.       expects a reliable transport that is transparent (that is, there is no 
  67.       translation of characters, including characters such as such as linefeeds 
  68.       or carriage returns), and can transmit all 256 octets (for example for 
  69.       proper handling of binary files, compression, and encryption).  The 
  70.       encoding of characters specified by the protocol (the names of requests 
  71.       and so on) is the invariant ISO 646 character set (a subset of most 
  72.       popular character sets including ASCII and others).  For more details on 
  73.       running the protocol over the TCP reliable transport, see Connection and 
  74.       Authentication. 
  75.  
  76.      Security and authentication are handled outside this protocol (but see 
  77.       below about 'cvs kserver' and 'cvs pserver'). 
  78.  
  79.      The protocol makes it possible for updates to be atomic with respect to 
  80.       checkins; that is if someone commits changes to several files in one cvs 
  81.       command, then an update by someone else would either get all the changes, 
  82.       or none of them.  The current CVS server can't do this, but that isn't 
  83.       the protocol's fault. 
  84.  
  85.      The protocol is, with a few exceptions, transaction-based.  That is, the 
  86.       client sends all its requests (without waiting for server responses), and 
  87.       then waits for the server to send back all responses (without waiting for 
  88.       further client requests).  This has the advantage of minimizing network 
  89.       turnarounds and the disadvantage of sometimes transferring more data than 
  90.       would be necessary if there were a richer interaction.  Another, more 
  91.       subtle, advantage is that there is no need for the protocol to provide 
  92.       locking for features such as making checkins atomic with respect to 
  93.       updates.  Any such locking can be handled entirely by the server.  A good 
  94.       server implementation (such as the current CVS server) will make sure 
  95.       that it does not have any such locks in place whenever it is waiting for 
  96.       communication with the client; this prevents one client on a slow or 
  97.       flaky network from interfering with the work of others. 
  98.  
  99.      It is a general design goal to provide only one way to do a given 
  100.       operation (where possible).  For example, implementations have no choice 
  101.       about whether to terminate lines with linefeeds or some other 
  102.       character(s), and request and response names are case-sensitive.  This is 
  103.       to enhance interoperability.  If a protocol allows more than one way to 
  104.       do something, it is all too easy for some implementations to support only 
  105.       some of them (perhaps accidentally). 
  106.  
  107.  
  108. ΓòÉΓòÉΓòÉ 4. How to Connect to and Authenticate Oneself to the CVS server ΓòÉΓòÉΓòÉ
  109.  
  110.  Connection and authentication occurs before the CVS protocol itself is 
  111.  started.  There are several ways to connect. 
  112.  
  113.  server 
  114.            If the client has a way to execute commands on the server, and 
  115.            provide input to the commands and output from them, then it can 
  116.            connect that way.  This could be the usual rsh (port 514) protocol, 
  117.            Kerberos rsh, SSH, or any similar mechanism.  The client may allow 
  118.            the user to specify the name of the server program; the default is 
  119.            cvs.  It is invoked with one argument, server.  Once it invokes the 
  120.            server, the client proceeds to start the cvs protocol. 
  121.  
  122.  kserver 
  123.            The kerberized server listens on a port (in the current 
  124.            implementation, by having inetd call "cvs kserver") which defaults 
  125.            to 1999.  The client connects, sends the usual kerberos 
  126.            authentication information, and then starts the cvs protocol.  Note: 
  127.            port 1999 is officially registered for another use, and in any event 
  128.            one cannot register more than one port for CVS, so GSS-API (see 
  129.            below) is recommended instead of kserver as a way to support 
  130.            kerberos. 
  131.  
  132.  pserver 
  133.            The name pserver is somewhat confusing.  It refers to both a generic 
  134.            framework which allows the CVS protocol to support several 
  135.            authentication mechanisms, and a name for a specific mechanism which 
  136.            transfers a username and a cleartext password.  Servers need not 
  137.            support all mechanisms, and in fact servers will typically want to 
  138.            support only those mechanisms which meet the relevant security 
  139.            needs. 
  140.  
  141.            The pserver server listens on a port (in the current implementation, 
  142.            by having inetd call "cvs pserver") which defaults to 2401 (this 
  143.            port is officially registered).  The client connects, and sends the 
  144.            following: 
  145.  
  146.                1. the string 'BEGIN AUTH REQUEST', a linefeed, 
  147.  
  148.                2. the cvs root, a linefeed, 
  149.  
  150.                3. the username, a linefeed, 
  151.  
  152.                4. the password trivially encoded (see Password scrambling), a 
  153.                   linefeed, 
  154.  
  155.                5. the string 'END AUTH REQUEST', and a linefeed. 
  156.  
  157.              The client must send the identical string for cvs root both here 
  158.              and later in the Root request of the cvs protocol itself.  Servers 
  159.              are encouraged to enforce this restriction. The possible server 
  160.              responses (each of which is followed by a linefeed) are the 
  161.              following.  Note that although there is a small similarity between 
  162.              this authentication protocol and the cvs protocol, they are 
  163.              separate. 
  164.  
  165.              I LOVE YOU 
  166.                          The authentication is successful.  The client proceeds 
  167.                          with the cvs protocol itself. 
  168.  
  169.              I HATE YOU 
  170.                          The authentication fails.  After sending this 
  171.                          response, the server may close the connection.  It is 
  172.                          up to the server to decide whether to give this 
  173.                          response, which is generic, or a more specific 
  174.                          response using 'E' and/or 'error'. 
  175.  
  176.              E text 
  177.                          Provide a message for the user.  After this reponse, 
  178.                          the authentication protocol continues with another 
  179.                          response.  Typically the server will provide a series 
  180.                          of 'E' responses followed by 'error'. Compatibility 
  181.                          note: CVS 1.9.10 and older clients will print 
  182.                          unrecognized auth response and text, and then exit, 
  183.                          upon receiving this response. 
  184.  
  185.              error code text 
  186.                          The authentication fails.  After sending this 
  187.                          response, the server may close the connection.  The 
  188.                          code is a code describing why it failed, intended for 
  189.                          computer consumption.  The only code currently defined 
  190.                          is '0' which is nonspecific, but clients must silently 
  191.                          treat any unrecognized codes as nonspecific. The text 
  192.                          should be supplied to the user.  Compatibility note: 
  193.                          CVS 1.9.10 and older clients will print unrecognized 
  194.                          auth response and text, and then exit, upon receiving 
  195.                          this response. Note that text for this response, or 
  196.                          the text in an E response, is not designed for machine 
  197.                          parsing.  More vigorous use of code, or future 
  198.                          extensions, will be needed to prove a cleaner 
  199.                          machine-parseable indication of what the error was. 
  200.  
  201.              If the client wishes to merely authenticate without starting the 
  202.              cvs protocol, the procedure is the same, except BEGIN AUTH REQUEST 
  203.              is replaced with BEGIN VERIFICATION REQUEST, END AUTH REQUEST is 
  204.              replaced with END VERIFICATION REQUEST, and upon receipt of I LOVE 
  205.              YOU the connection is closed rather than continuing. 
  206.  
  207.              Another mechanism is GSSAPI authentication.  GSSAPI is a generic 
  208.              interface to security services such as kerberos.  GSSAPI is 
  209.              specified in RFC2078 (GSSAPI version 2) and RFC1508 (GSSAPI 
  210.              version 1); we are not aware of differences between the two which 
  211.              affect the protocol in incompatible ways, so we make no attempt to 
  212.              specify one version or the other. The procedure here is to start 
  213.              with 'BEGIN GSSAPI REQUEST'.  GSSAPI authentication information is 
  214.              then exchanged between the client and the server.  Each packet of 
  215.              information consists of a two byte big endian length, followed by 
  216.              that many bytes of data. After the GSSAPI authentication is 
  217.              complete, the server continues with the responses described above 
  218.              ('I LOVE YOU', etc.). 
  219.  
  220.  future possibilities 
  221.            There are a nearly unlimited number of ways to connect and 
  222.            authenticate. One might want to allow access based on IP address 
  223.            (similar to the usual rsh protocol but with different/no 
  224.            restrictions on ports < 1024), to adopt mechanisms such as Pluggable 
  225.            Authentication Modules (PAM), to allow users to run their own 
  226.            servers under their own usernames without root access, or any number 
  227.            of other possibilities.  The way to add future mechanisms, for the 
  228.            most part, should be to continue to use port 2401, but to use 
  229.            different strings in place of 'BEGIN AUTH REQUEST'. 
  230.  
  231.  
  232. ΓòÉΓòÉΓòÉ 5. Password scrambling algorithm ΓòÉΓòÉΓòÉ
  233.  
  234.  The pserver authentication protocol, as described in Connection and 
  235.  Authentication, trivially encodes the passwords.  This is only to prevent 
  236.  inadvertent compromise; it provides no protection against even a relatively 
  237.  unsophisticated attacker.  For comparison, HTTP Basic Authentication (as 
  238.  described in RFC2068) uses BASE64 for a similar purpose.  CVS uses its own 
  239.  algorithm, described here. 
  240.  
  241.  The scrambled password starts with 'A', which serves to identify the 
  242.  scrambling algorithm in use.  After that follows a single octet for each 
  243.  character in the password, according to a fixed encoding.  The values are 
  244.  shown here, with the encoded values in decimal.  Control characters, space, 
  245.  and characters outside the invariant ISO 646 character set are not shown; such 
  246.  characters are not recommended for use in passwords.  There is a long 
  247.  discussion of character set issues in Protocol Notes. 
  248.  
  249.                           0 111      P 125      p  58
  250.                       ! 120  1  52  A  57  Q  55  a 121  q 113
  251.                       "  53  2  75  B  83  R  54  b 117  r  32
  252.                           3 119  C  43  S  66  c 104  s  90
  253.                           4  49  D  46  T 124  d 101  t  44
  254.                       % 109  5  34  E 102  U 126  e 100  u  98
  255.                       &  72  6  82  F  40  V  59  f  69  v  60
  256.                       ' 108  7  81  G  89  W  47  g  73  w  51
  257.                       (  70  8  95  H  38  X  92  h  99  x  33
  258.                       )  64  9  65  I 103  Y  71  i  63  y  97
  259.                       *  76  : 112  J  45  Z 115  j  94  z  62
  260.                       +  67  ;  86  K  50      k  93
  261.                       , 116  < 118  L  42      l  39
  262.                       -  74  = 110  M 123      m  37
  263.                       ┬╖  68  > 122  N  91      n  61
  264.                       /  87  ? 105  O  35  _  56  o  48
  265.  
  266.  
  267. ΓòÉΓòÉΓòÉ 6. The CVS client/server protocol ΓòÉΓòÉΓòÉ
  268.  
  269.  In the following, '\n' refers to a linefeed and '\t' refers to a horizontal 
  270.  tab; requests are what the client sends and responses are what the server 
  271.  sends.  In general, the connection is governed by the client---the server does 
  272.  not send responses without first receiving requests to do so; see Response 
  273.  intro for more details of this convention. 
  274.  
  275.  It is typical, early in the connection, for the client to transmit a 
  276.  Valid-responses request, containing all the responses it supports, followed by 
  277.  a valid-requests request, which elicits from the server a Valid-requests 
  278.  response containing all the requests it understands.  In this way, the client 
  279.  and server each find out what the other supports before exchanging large 
  280.  amounts of data (such as file contents). 
  281.  
  282.  General protocol conventions: 
  283.  
  284.  Entries Lines                 Transmitting RCS data 
  285.  File Modes                    Read, write, execute, and possibly more┬╖┬╖┬╖ 
  286.  Filenames                     Conventions regarding filenames 
  287.  File transmissions            How file contents are transmitted 
  288.  Strings                       Strings in various requests and responses 
  289.  Dates                         Times and dates The protocol itself: 
  290.  Request intro                 General conventions relating to requests 
  291.  Requests                      List of requests 
  292.  Response intro                General conventions relating to responses 
  293.  Response pathnames            The "pathname" in responses 
  294.  Responses                     List of responses 
  295.  Text tags                     More details about the MT response An example 
  296.                                session, and some further observations: 
  297.  Example                       A conversation between client and server 
  298.  Requirements                  Things not to omit from an implementation 
  299.  Obsolete                      Former protocol features 
  300.  
  301.  
  302. ΓòÉΓòÉΓòÉ 6.1. Entries Lines ΓòÉΓòÉΓòÉ
  303.  
  304.  Entries lines are transmitted as: 
  305.  
  306.                       / name / version / conflict / options / tag_or_date
  307.  
  308.  tag_or_date is either 'T' tag or 'D' date or empty.  If it is followed by a 
  309.  slash, anything after the slash shall be silently ignored. 
  310.  
  311.  version can be empty, or start with '0' or '-', for no user file, new user 
  312.  file, or user file to be removed, respectively. 
  313.  
  314.  conflict, if it starts with '+', indicates that the file had conflicts in it. 
  315.  The rest of conflict is '=' if the timestamp matches the file, or anything 
  316.  else if it doesn't.  If conflict does not start with a '+', it is silently 
  317.  ignored. 
  318.  
  319.  options signifies the keyword expansion options (for example '-ko').  In an 
  320.  Entry request, this indicates the options that were specified with the file 
  321.  from the previous file updating response (see Response intro, for a list of 
  322.  file updating responses); if the client is specifying the '-k' or '-A' option 
  323.  to update, then it is the server which figures out what overrides what. 
  324.  
  325.  
  326. ΓòÉΓòÉΓòÉ 6.2. File Modes ΓòÉΓòÉΓòÉ
  327.  
  328.  A mode is any number of repetitions of 
  329.  
  330.                       mode-type = data
  331.  
  332.  separated by ','. 
  333.  
  334.  mode-type is an identifier composed of alphanumeric characters. Currently 
  335.  specified: 'u' for user, 'g' for group, 'o' for other (see below for 
  336.  discussion of whether these have their POSIX meaning or are more loose). 
  337.  Unrecognized values of mode-type are silently ignored. 
  338.  
  339.  data consists of any data not containing ',', '\0' or '\n'.  For 'u', 'g', and 
  340.  'o' mode types, data consists of alphanumeric characters, where 'r' means 
  341.  read, 'w' means write, 'x' means execute, and unrecognized letters are 
  342.  silently ignored. 
  343.  
  344.  The two most obvious ways in which the mode matters are: (1) is it writeable? 
  345.  This is used by the developer communication features, and is implemented even 
  346.  on OS/2 (and could be implemented on DOS), whose notion of mode is limited to 
  347.  a readonly bit. (2) is it executable? Unix CVS users need CVS to store this 
  348.  setting (for shell scripts and the like).  The current CVS implementation on 
  349.  unix does a little bit more than just maintain these two settings, but it 
  350.  doesn't really have a nice general facility to store or version control the 
  351.  mode, even on unix, much less across operating systems with diverse protection 
  352.  features.  So all the ins and outs of what the mode means across operating 
  353.  systems haven't really been worked out (e.g. should the VMS port use ACLs to 
  354.  get POSIX semantics for groups?). 
  355.  
  356.  
  357. ΓòÉΓòÉΓòÉ 6.3. Conventions regarding transmission of file names ΓòÉΓòÉΓòÉ
  358.  
  359.  In most contexts, '/' is used to separate directory and file names in 
  360.  filenames, and any use of other conventions (for example, that the user might 
  361.  type on the command line) is converted to that form.  The only exceptions 
  362.  might be a few cases in which the server provides a magic cookie which the 
  363.  client then repeats verbatim, but as the server has not yet been ported beyond 
  364.  unix, the two rules provide the same answer (and what to do if future server 
  365.  ports are operating on a repository like e:/foo or CVS_ROOT:[FOO.BAR] has not 
  366.  been carefully thought out). 
  367.  
  368.  Characters outside the invariant ISO 646 character set should be avoided in 
  369.  filenames.  This restriction may need to be relaxed to allow for characters 
  370.  such as '[' and ']' (see above about non-unix servers); this has not been 
  371.  carefully considered (and currently implementations probably use whatever 
  372.  character sets that the operating systems they are running on allow, and/or 
  373.  that users specify).  Of course the most portable practice is to restrict 
  374.  oneself further, to the POSIX portable filename character set as specified in 
  375.  POSIX.1. 
  376.  
  377.  
  378. ΓòÉΓòÉΓòÉ 6.4. File transmissions ΓòÉΓòÉΓòÉ
  379.  
  380.  File contents (noted below as file transmission) can be sent in one of two 
  381.  forms.  The simpler form is a number of bytes, followed by a linefeed, 
  382.  followed by the specified number of bytes of file contents. These are the 
  383.  entire contents of the specified file.  Second, if both client and server 
  384.  support 'gzip-file-contents', a 'z' may precede the length, and the `file 
  385.  contents' sent are actually compressed with 'gzip' (RFC1952/1951) compression. 
  386.  The length specified is that of the compressed version of the file. 
  387.  
  388.  In neither case are the file content followed by any additional data. The 
  389.  transmission of a file will end with a linefeed iff that file (or its 
  390.  compressed form) ends with a linefeed. 
  391.  
  392.  The encoding of file contents depends on the value for the '-k' option.  If 
  393.  the file is binary (as specified by the '-kb' option in the appropriate 
  394.  place), then it is just a certain number of octets, and the protocol 
  395.  contributes nothing towards determining the encoding (using the file name is 
  396.  one widespread, if not universally popular, mechanism). If the file is text 
  397.  (not binary), then the file is sent as a series of lines, separated by 
  398.  linefeeds.  If the keyword expansion is set to something other than '-ko', 
  399.  then it is expected that the file conform to the RCS expectations regarding 
  400.  keyword expansion---in particular, that it is in a character set such as ASCII 
  401.  in which 0x24 is a dollar sign ('$'). 
  402.  
  403.  
  404. ΓòÉΓòÉΓòÉ 6.5. Strings ΓòÉΓòÉΓòÉ
  405.  
  406.  In various contexts, for example the Argument request and the M response, one 
  407.  transmits what is essentially an arbitrary string.  Often this will have been 
  408.  supplied by the user (for example, the '-m' option to the ci request).  The 
  409.  protocol has no mechanism to specify the character set of such strings; it 
  410.  would be fairly safe to stick to the invariant ISO 646 character set but the 
  411.  existing practice is probably to just transmit whatever the user specifies, 
  412.  and hope that everyone involved agrees which character set is in use, or 
  413.  sticks to a common subset. 
  414.  
  415.  
  416. ΓòÉΓòÉΓòÉ 6.6. Dates ΓòÉΓòÉΓòÉ
  417.  
  418.  The protocol contains times and dates in various places. 
  419.  
  420.  For the '-D' option to the annotate, co, diff, export, history, rdiff, rtag, 
  421.  tag, and update requests, the server should support two formats: 
  422.  
  423.                       26 May 1997 13:01:40 -0000  ; RFC 822 as modified by RFC 1123
  424.                       5/26/1997 13:01:40 GMT   ; traditional
  425.  
  426.  The former format is preferred; the latter however is sent by the CVS command 
  427.  line client (versions 1.5 through at least 1.9). 
  428.  
  429.  For the '-d' option to the log request, servers should at least support RFC 
  430.  822/1123 format.  Clients are encouraged to use this format too (traditionally 
  431.  the command line CVS client has just passed along the date format specified by 
  432.  the user, however). 
  433.  
  434.  The Mod-time response and Checkin-time request use RFC 822/1123 format (see 
  435.  the descriptions of that response and request for details). 
  436.  
  437.  For Notify, see the description of that request. 
  438.  
  439.  
  440. ΓòÉΓòÉΓòÉ 6.7. Request intro ΓòÉΓòÉΓòÉ
  441.  
  442.  By convention, requests which begin with a capital letter do not elicit a 
  443.  response from the server, while all others do -- save one.  The exception is 
  444.  'gzip-file-contents'.  Unrecognized requests will always elicit a response 
  445.  from the server, even if that request begins with a capital letter. 
  446.  
  447.  The term command means a request which expects a response (except 
  448.  valid-requests).  The general model is that the client transmits a great 
  449.  number of requests, but nothing happens until the very end when the client 
  450.  transmits a command.  Although the intention is that transmitting several 
  451.  commands in one connection should be legal, existing servers probably have 
  452.  some bugs with some combinations of more than one command, and so clients may 
  453.  find it necessary to make several connections in some cases.  This should be 
  454.  thought of as a workaround rather than a desired attribute of the protocol. 
  455.  
  456.  
  457. ΓòÉΓòÉΓòÉ 6.8. Requests ΓòÉΓòÉΓòÉ
  458.  
  459.  Here are the requests: 
  460.  
  461.  Root pathname \n 
  462.            Response expected: no.  Tell the server which CVSROOT to use. Note 
  463.            that pathname is a local directory and not a fully qualified CVSROOT 
  464.            variable.  pathname must already exist; if creating a new root, use 
  465.            the init request, not Root.  pathname does not include the hostname 
  466.            of the server, how to access the server, etc.; by the time the CVS 
  467.            protocol is in use, connection, authentication, etc., are already 
  468.            taken care of. 
  469.  
  470.            The Root request must be sent only once, and it must be sent before 
  471.            any requests other than Valid-responses, valid-requests, 
  472.            UseUnchanged, Set or init. 
  473.  
  474.  Valid-responses request-list \n 
  475.            Response expected: no. Tell the server what responses the client 
  476.            will accept. request-list is a space separated list of tokens. 
  477.  
  478.  valid-requests \n 
  479.            Response expected: yes. Ask the server to send back a Valid-requests 
  480.            response. 
  481.  
  482.  Directory local-directory \n 
  483.            Additional data: repository \n.  Response expected: no. Tell the 
  484.            server what directory to use.  The repository should be a directory 
  485.            name from a previous server response.  Note that this both gives a 
  486.            default for Entry and Modified and also for ci and the other 
  487.            commands; normal usage is to send Directory for each directory in 
  488.            which there will be an Entry or Modified, and then a final Directory 
  489.            for the original directory, then the command. The local-directory is 
  490.            relative to the top level at which the command is occurring (i.e. 
  491.            the last Directory which is sent before the command); to indicate 
  492.            that top level, '.' should be sent for local-directory. 
  493.  
  494.            Here is an example of where a client gets repository and 
  495.            local-directory.  Suppose that there is a module defined by 
  496.  
  497.                       moddir 1dir
  498.  
  499.  That is, one can check out moddir and it will take 1dir in the repository and 
  500.  check it out to moddir in the working directory.  Then an initial check out 
  501.  could proceed like this: 
  502.  
  503.                       C: Root /home/kingdon/zwork/cvsroot
  504.                       ┬╖ . .
  505.                       C: Argument moddir
  506.                       C: Directory .
  507.                       C: /home/kingdon/zwork/cvsroot
  508.                       C: co
  509.                       S: Clear-sticky moddir/
  510.                       S: /home/kingdon/zwork/cvsroot/1dir/
  511.                       ┬╖ . .
  512.                       S: ok
  513.  
  514.  In this example the response shown is Clear-sticky, but it could be another 
  515.  response instead.  Note that it returns two pathnames. The first one, 
  516.  'moddir/', indicates the working directory to check out into.  The second one, 
  517.  ending in '1dir/', indicates the directory to pass back to the server in a 
  518.  subsequent Directory request.  For example, a subsequent update request might 
  519.  look like: 
  520.  
  521.                       C: Directory moddir
  522.                       C: /home/kingdon/zwork/cvsroot/1dir
  523.                       ┬╖ . .
  524.                       C: update
  525.  
  526.  For a given local-directory, the repository will be the same for each of the 
  527.  responses, so one can use the repository from whichever response is most 
  528.  convenient.  Typically a client will store the repository along with the 
  529.  sources for each local-directory, use that same setting whenever operating on 
  530.  that local-directory, and not update the setting as long as the 
  531.  local-directory exists. 
  532.  
  533.  A client is free to rename a local-directory at any time (for example, in 
  534.  response to an explicit user request).  While it is true that the server 
  535.  supplies a local-directory to the client, as noted above, this is only the 
  536.  default place to put the directory.  Of course, the various Directory requests 
  537.  for a single command (for example, update or ci request) should name a 
  538.  particular directory with the same local-directory. 
  539.  
  540.  Each Directory request specifies a brand-new local-directory and repository; 
  541.  that is, local-directory and repository are never relative to paths specified 
  542.  in any previous Directory request. 
  543.  
  544.  Here's a more complex example, in which we request an update of a working 
  545.  directory which has been checked out from multiple places in the repository. 
  546.  
  547.                       C: Argument dir1
  548.                       C: Directory dir1
  549.                       C: /home/foo/repos/mod1
  550.                       ┬╖ . .
  551.                       C: Argument dir2
  552.                       C: Directory dir2
  553.                       C: /home/foo/repos/mod2
  554.                       ┬╖ . .
  555.                       C: Argument dir3
  556.                       C: Directory dir3/subdir3
  557.                       C: /home/foo/repos/mod3
  558.                       ┬╖ . .
  559.                       C: update
  560.  
  561.  While directories dir1 and dir2 will be handled in similar fashion to the 
  562.  other examples given above, dir3 is slightly different from the server's 
  563.  standpoint.  Notice that module mod3 is actually checked out into 
  564.  dir3/subdir3, meaning that directory dir3 is either empty or does not contain 
  565.  data checked out from this repository. 
  566.  
  567.  The above example will work correctly in CVS 1.10.1 and later.  The server 
  568.  will descend the tree starting from all directories mentioned in Argument 
  569.  requests and update those directories specifically mentioned in Directory 
  570.  requests. 
  571.  
  572.  Previous versions of CVS (1.10 and earlier) do not behave the same way.  While 
  573.  the descent of the tree begins at all directories mentioned in Argument 
  574.  requests, descent into subdirectories only occurs if a directory has been 
  575.  mentioned in a Directory request. Therefore, the above example would succeed 
  576.  in updating dir1 and dir2, but would skip dir3 because that directory was not 
  577.  specifically mentioned in a Directory request.  A functional version of the 
  578.  above that would run on a 1.10 or earlier server is as follows: 
  579.  
  580.                       C: Argument dir1
  581.                       C: Directory dir1
  582.                       C: /home/foo/repos/mod1
  583.                       ┬╖ . .
  584.                       C: Argument dir2
  585.                       C: Directory dir2
  586.                       C: /home/foo/repos/mod2
  587.                       ┬╖ . .
  588.                       C: Argument dir3
  589.                       C: Directory dir3
  590.                       C: /home/foo/repos/.
  591.                       ┬╖ . .
  592.                       C: Directory dir3/subdir3
  593.                       C: /home/foo/repos/mod3
  594.                       ┬╖ . .
  595.                       C: update
  596.  
  597.  Note the extra Directory dir3 request.  It might be better to use Emptydir as 
  598.  the repository for the dir3 directory, but the above will certainly work. 
  599.  
  600.  One more peculiarity of the 1.10 and earlier protocol is the ordering of 
  601.  Directory arguments.  In order for a subdirectory to be registered correctly 
  602.  for descent by the recursion processor, its parent must be sent first.  For 
  603.  example, the following would not work to update dir3/subdir3: 
  604.  
  605.                       ┬╖ . .
  606.                       C: Argument dir3
  607.                       C: Directory dir3/subdir3
  608.                       C: /home/foo/repos/mod3
  609.                       ┬╖ . .
  610.                       C: Directory dir3
  611.                       C: /home/foo/repos/.
  612.                       ┬╖ . .
  613.                       C: update
  614.  
  615.  The implementation of the server in 1.10 and earlier writes the administration 
  616.  files for a given directory at the time of the Directory request.  It also 
  617.  tries to register the directory with its parent to mark it for recursion.  In 
  618.  the above example, at the time dir3/subdir3 is created, the physical directory 
  619.  for dir3 will be created on disk, but the administration files will not have 
  620.  been created.  Therefore, when the server tries to register dir3/subdir3 for 
  621.  recursion, the operation will silently fail because the administration files 
  622.  do not yet exist for dir3. 
  623.  
  624.  Max-dotdot level \n 
  625.            Response expected: no. Tell the server that level levels of 
  626.            directories above the directory which Directory requests are 
  627.            relative to will be needed.  For example, if the client is planning 
  628.            to use a Directory request for '┬╖┬╖/┬╖┬╖/foo', it must send a 
  629.            Max-dotdot request with a level of at least 2. Max-dotdot must be 
  630.            sent before the first Directory request. 
  631.  
  632.  Static-directory \n 
  633.            Response expected: no.  Tell the server that the directory most 
  634.            recently specified with Directory should not have additional files 
  635.            checked out unless explicitly requested.  The client sends this if 
  636.            the Entries.Static flag is set, which is controlled by the 
  637.            Set-static-directory and Clear-static-directory responses. 
  638.  
  639.  Sticky tagspec \n 
  640.            Response expected: no.  Tell the server that the directory most 
  641.            recently specified with Directory has a sticky tag or date tagspec. 
  642.            The first character of tagspec is 'T' for a tag, 'D' for a date, or 
  643.            some other character supplied by a Set-sticky response from a 
  644.            previous request to the server.  The remainder of tagspec contains 
  645.            the actual tag or date, again as supplied by Set-sticky. 
  646.  
  647.            The server should remember Static-directory and Sticky requests for 
  648.            a particular directory; the client need not resend them each time it 
  649.            sends a Directory request for a given directory. However, the server 
  650.            is not obliged to remember them beyond the context of a single 
  651.            command. 
  652.  
  653.  Checkin-prog program \n 
  654.            Response expected: no.  Tell the server that the directory most 
  655.            recently specified with Directory has a checkin program program. 
  656.            Such a program would have been previously set with the 
  657.            Set-checkin-prog response. 
  658.  
  659.  Update-prog program \n 
  660.            Response expected: no.  Tell the server that the directory most 
  661.            recently specified with Directory has an update program program. 
  662.            Such a program would have been previously set with the 
  663.            Set-update-prog response. 
  664.  
  665.  Entry entry-line \n 
  666.            Response expected: no.  Tell the server what version of a file is on 
  667.            the local machine.  The name in entry-line is a name relative to the 
  668.            directory most recently specified with Directory.  If the user is 
  669.            operating on only some files in a directory, Entry requests for only 
  670.            those files need be included.  If an Entry request is sent without 
  671.            Modified, Is-modified, or Unchanged, it means the file is lost (does 
  672.            not exist in the working directory).  If both Entry and one of 
  673.            Modified, Is-modified, or Unchanged are sent for the same file, 
  674.            Entry must be sent first.  For a given file, one can send Modified, 
  675.            Is-modified, or Unchanged, but not more than one of these three. 
  676.  
  677.  Kopt option \n 
  678.            This indicates to the server which keyword expansion options to use 
  679.            for the file specified by the next Modified or Is-modified request 
  680.            (for example '-kb' for a binary file).  This is similar to Entry, 
  681.            but is used for a file for which there is no entries line. Typically 
  682.            this will be a file being added via an add or import request.  The 
  683.            client may not send both Kopt and Entry for the same file. 
  684.  
  685.  Checkin-time time \n 
  686.            For the file specified by the next Modified request, use time as the 
  687.            time of the checkin.  The time is in the format specified by RFC822 
  688.            as modified by RFC1123.  The client may specify any timezone it 
  689.            chooses; servers will want to convert that to their own timezone as 
  690.            appropriate.  An example of this format is: 
  691.  
  692.                       26 May 1997 13:01:40 -0400
  693.  
  694.  There is no requirement that the client and server clocks be synchronized. 
  695.  The client just sends its recommendation for a timestamp (based on file 
  696.  timestamps or whatever), and the server should just believe it (this means 
  697.  that the time might be in the future, for example). 
  698.  
  699.  Note that this is not a general-purpose way to tell the server about the 
  700.  timestamp of a file; that would be a separate request (if there are servers 
  701.  which can maintain timestamp and time of checkin separately). 
  702.  
  703.  This request should affect the import request, and may optionally affect the 
  704.  ci request or other relevant requests if any. 
  705.  
  706.  Modified filename \n 
  707.            Response expected: no.  Additional data: mode, \n, file 
  708.            transmission. Send the server a copy of one locally modified file. 
  709.            filename is a file within the most recent directory sent with 
  710.            Directory; it must not contain '/'.  If the user is operating on 
  711.            only some files in a directory, only those files need to be 
  712.            included.  This can also be sent without Entry, if there is no entry 
  713.            for the file. 
  714.  
  715.  Is-modified filename \n 
  716.            Response expected: no.  Additional data: none.  Like Modified, but 
  717.            used if the server only needs to know whether the file is modified, 
  718.            not the contents. 
  719.  
  720.            The commands which can take Is-modified instead of Modified with no 
  721.            known change in behavior are: admin, diff (if and only if two '-r' 
  722.            or '-D' options are specified), watch-on, watch-off, watch-add, 
  723.            watch-remove, watchers, editors, log, and annotate. 
  724.  
  725.            For the status command, one can send Is-modified but if the client 
  726.            is using imperfect mechanisms such as timestamps to determine 
  727.            whether to consider a file modified, then the behavior will be 
  728.            different.  That is, if one sends Modified, then the server will 
  729.            actually compare the contents of the file sent and the one it 
  730.            derives from to determine whether the file is genuinely modified. 
  731.            But if one sends Is-modified, then the server takes the client's 
  732.            word for it.  A similar situation exists for tag, if the '-c' option 
  733.            is specified. 
  734.  
  735.            Commands for which Modified is necessary are co, ci, update, and 
  736.            import. 
  737.  
  738.            Commands which do not need to inform the server about a working 
  739.            directory, and thus should not be sending either Modified or 
  740.            Is-modified: rdiff, rtag, history, init, and release. 
  741.  
  742.            Commands for which further investigation is warranted are: remove, 
  743.            add, and export.  Pending such investigation, the more conservative 
  744.            course of action is to stick to Modified. 
  745.  
  746.  Unchanged filename \n 
  747.            Response expected: no.  Tell the server that filename has not been 
  748.            modified in the checked out directory.  The filename is a file 
  749.            within the most recent directory sent with Directory; it must not 
  750.            contain '/'. 
  751.  
  752.  UseUnchanged \n 
  753.            Response expected: no.  To specify the version of the protocol 
  754.            described in this document, servers must support this request 
  755.            (although it need not do anything) and clients must issue it. 
  756.  
  757.  Notify filename \n 
  758.            Response expected: no. Tell the server that an edit or unedit 
  759.            command has taken place.  The server needs to send a Notified 
  760.            response, but such response is deferred until the next time that the 
  761.            server is sending responses. The filename is a file within the most 
  762.            recent directory sent with Directory; it must not contain '/'. 
  763.            Additional data: 
  764.  
  765.                       notification-type \t time \t clienthost \t
  766.                       working-dir \t watches \n
  767.  where notification-type is 'E' for edit, 'U' for unedit, undefined behavior if 
  768.  'C', and all other letters should be silently ignored for future expansion. 
  769.  time is the time at which the edit or unedit took place, in a user-readable 
  770.  format of the client's choice (the server should treat the time as an opaque 
  771.  string rather than interpreting it). clienthost is the name of the host on 
  772.  which the edit or unedit took place, and working-dir is the pathname of the 
  773.  working directory where the edit or unedit took place.  watches are the 
  774.  temporary watches, zero or more of the following characters in the following 
  775.  order: 'E' for edit, 'U' for unedit, 'C' for commit, and all other letters 
  776.  should be silently ignored for future expansion.  If notification-type is 'E' 
  777.  the temporary watches are set; if it is 'U' they are cleared. If watches is 
  778.  followed by \t then the \t and the rest of the line should be ignored, for 
  779.  future expansion. 
  780.  
  781.  The time, clienthost, and working-dir fields may not contain the characters 
  782.  '+', ',', '>', ';', or '='. 
  783.  
  784.  Note that a client may be capable of performing an edit or unedit operation 
  785.  without connecting to the server at that time, and instead connecting to the 
  786.  server when it is convenient (for example, when a laptop is on the net again) 
  787.  to send the Notify requests. Even if a client is capable of deferring 
  788.  notifications, it should attempt to send them immediately (one can send Notify 
  789.  requests together with a noop request, for example), unless perhaps if it can 
  790.  know that a connection would be impossible. 
  791.  
  792.  Questionable filename \n 
  793.            Response expected: no.  Additional data: no.  Tell the server to 
  794.            check whether filename should be ignored, and if not, next time the 
  795.            server sends responses, send (in a M response) '?' followed by the 
  796.            directory and filename.  filename must not contain '/'; it needs to 
  797.            be a file in the directory named by the most recent Directory 
  798.            request. 
  799.  
  800.  Case \n 
  801.            Response expected: no.  Tell the server that filenames should be 
  802.            matched in a case-insensitive fashion.  Note that this is not the 
  803.            primary mechanism for achieving case-insensitivity; for the most 
  804.            part the client keeps track of the case which the server wants to 
  805.            use and takes care to always use that case regardless of what the 
  806.            user specifies.  For example the filenames given in Entry and 
  807.            Modified requests for the same file must match in case regardless of 
  808.            whether the Case request is sent.  The latter mechanism is more 
  809.            general (it could also be used for 8.3 filenames, VMS filenames with 
  810.            more than one '.', and any other situation in which there is a 
  811.            predictable mapping between filenames in the working directory and 
  812.            filenames in the protocol), but there are some situations it cannot 
  813.            handle (ignore patterns, or situations where the user specifies a 
  814.            filename and the client does not know about that file). 
  815.  
  816.  Argument text \n 
  817.            Response expected: no. Save argument for use in a subsequent 
  818.            command.  Arguments accumulate until an argument-using command is 
  819.            given, at which point they are forgotten. 
  820.  
  821.  Argumentx text \n 
  822.            Response expected: no.  Append \n followed by text to the current 
  823.            argument being saved. 
  824.  
  825.  Global_option option \n 
  826.            Response expected: no. Transmit one of the global options '-q', 
  827.            '-Q', '-l', '-t', '-r', or '-n'.  option must be one of those 
  828.            strings, no variations (such as combining of options) are allowed. 
  829.            For graceful handling of valid-requests, it is probably better to 
  830.            make new global options separate requests, rather than trying to add 
  831.            them to this request. 
  832.  
  833.  Gzip-stream level \n 
  834.            Response expected: no. Use zlib (RFC 1950/1951) compression to 
  835.            compress all further communication between the client and the 
  836.            server.  After this request is sent, all further communication must 
  837.            be compressed.  All further data received from the server will also 
  838.            be compressed.  The level argument suggests to the server the level 
  839.            of compression that it should apply; it should be an integer between 
  840.            1 and 9, inclusive, where a higher number indicates more 
  841.            compression. 
  842.  
  843.  Kerberos-encrypt \n 
  844.            Response expected: no. Use Kerberos encryption to encrypt all 
  845.            further communication between the client and the server.  This will 
  846.            only work if the connection was made over Kerberos in the first 
  847.            place.  If both the Gzip-stream and the Kerberos-encrypt requests 
  848.            are used, the Kerberos-encrypt request should be used first.  This 
  849.            will make the client and server encrypt the compressed data, as 
  850.            opposed to compressing the encrypted data.  Encrypted data is 
  851.            generally incompressible. 
  852.  
  853.            Note that this request does not fully prevent an attacker from 
  854.            hijacking the connection, in the sense that it does not prevent 
  855.            hijacking the connection between the initial authentication and the 
  856.            Kerberos-encrypt request. 
  857.  
  858.  Gssapi-encrypt \n 
  859.            Response expected: no. Use GSSAPI encryption to encrypt all further 
  860.            communication between the client and the server.  This will only 
  861.            work if the connection was made over GSSAPI in the first place.  See 
  862.            Kerberos-encrypt, above, for the relation between Gssapi-encrypt and 
  863.            Gzip-stream. 
  864.  
  865.            Note that this request does not fully prevent an attacker from 
  866.            hijacking the connection, in the sense that it does not prevent 
  867.            hijacking the connection between the initial authentication and the 
  868.            Gssapi-encrypt request. 
  869.  
  870.  Gssapi-authenticate \n 
  871.            Response expected: no. Use GSSAPI authentication to authenticate all 
  872.            further communication between the client and the server.  This will 
  873.            only work if the connection was made over GSSAPI in the first place. 
  874.            Encrypted data is automatically authenticated, so using both 
  875.            Gssapi-authenticate and Gssapi-encrypt has no effect beyond that of 
  876.            Gssapi-encrypt.  Unlike encrypted data, it is reasonable to compress 
  877.            authenticated data. 
  878.  
  879.            Note that this request does not fully prevent an attacker from 
  880.            hijacking the connection, in the sense that it does not prevent 
  881.            hijacking the connection between the initial authentication and the 
  882.            Gssapi-authenticate request. 
  883.  
  884.  Set variable=value \n 
  885.            Response expected: no. Set a user variable variable to value. 
  886.  
  887.  expand-modules \n 
  888.            Response expected: yes.  Expand the modules which are specified in 
  889.            the arguments.  Returns the data in Module-expansion responses. 
  890.            Note that the server can assume that this is checkout or export, not 
  891.            rtag or rdiff; the latter do not access the working directory and 
  892.            thus have no need to expand modules on the client side. 
  893.  
  894.            Expand may not be the best word for what this request does.  It does 
  895.            not necessarily tell you all the files contained in a module, for 
  896.            example. Basically it is a way of telling you which working 
  897.            directories the server needs to know about in order to handle a 
  898.            checkout of the specified modules. 
  899.  
  900.            For example, suppose that the server has a module defined by 
  901.  
  902.                       aliasmodule -a 1dir
  903.  
  904.  That is, one can check out aliasmodule and it will take 1dir in the repository 
  905.  and check it out to 1dir in the working directory.  Now suppose the client 
  906.  already has this module checked out and is planning on using the co request to 
  907.  update it. Without using expand-modules, the client would have two bad 
  908.  choices: it could either send information about all working directories under 
  909.  the current directory, which could be unnecessarily slow, or it could be 
  910.  ignorant of the fact that aliasmodule stands for 1dir, and neglect to send 
  911.  information for 1dir, which would lead to incorrect operation. With 
  912.  expand-modules, the client would first ask for the module to be expanded: 
  913.  
  914.                       C: Root /home/kingdon/zwork/cvsroot
  915.                       ┬╖ . .
  916.                       C: Argument aliasmodule
  917.                       C: Directory .
  918.                       C: /home/kingdon/zwork/cvsroot
  919.                       C: expand-modules
  920.                       S: Module-expansion 1dir
  921.                       S: ok
  922.  
  923.  and then it knows to check the '1dir' directory and send requests such as 
  924.  Entry and Modified for the files in that directory. 
  925.  
  926.  ci \n 
  927.  
  928.  diff \n 
  929.  
  930.  tag \n 
  931.  
  932.  status \n 
  933.  
  934.  log \n 
  935.  
  936.  admin \n 
  937.  
  938.  history \n 
  939.  
  940.  watchers \n 
  941.  
  942.  editors \n 
  943.  
  944.  annotate \n 
  945.            Response expected: yes.  Actually do a cvs command.  This uses any 
  946.            previous Argument, Directory, Entry, or Modified requests, if they 
  947.            have been sent.  The last Directory sent specifies the working 
  948.            directory at the time of the operation.  No provision is made for 
  949.            any input from the user. This means that ci must use a -m argument 
  950.            if it wants to specify a log message. 
  951.  
  952.  co \n 
  953.            Response expected: yes.  Get files from the repository.  This uses 
  954.            any previous Argument, Directory, Entry, or Modified requests, if 
  955.            they have been sent.  Arguments to this command are module names; 
  956.            the client cannot know what directories they correspond to except by 
  957.            (1) just sending the co request, and then seeing what directory 
  958.            names the server sends back in its responses, and (2) the 
  959.            expand-modules request. 
  960.  
  961.  export \n 
  962.            Response expected: yes.  Get files from the repository.  This uses 
  963.            any previous Argument, Directory, Entry, or Modified requests, if 
  964.            they have been sent.  Arguments to this command are module names, as 
  965.            described for the co request.  The intention behind this command is 
  966.            that a client can get sources from a server without storing CVS 
  967.            information about those sources.  That is, a client probably should 
  968.            not count on being able to take the entries line returned in the 
  969.            Created response from an export request and send it in a future 
  970.            Entry request.  Note that the entries line in the Created response 
  971.            must indicate whether the file is binary or text, so the client can 
  972.            create it correctly. 
  973.  
  974.  rdiff \n 
  975.  
  976.  rtag \n 
  977.            Response expected: yes.  Actually do a cvs command.  This uses any 
  978.            previous Argument requests, if they have been sent.  The client 
  979.            should not send Directory, Entry, or Modified requests for this 
  980.            command; they are not used.  Arguments to these commands are module 
  981.            names, as described for co. 
  982.  
  983.  init root-name \n 
  984.            Response expected: yes.  If it doesn't already exist, create a CVS 
  985.            repository root-name.  Note that root-name is a local directory and 
  986.            not a fully qualified CVSROOT variable.  The Root request need not 
  987.            have been previously sent. 
  988.  
  989.  update \n 
  990.            Response expected: yes.  Actually do a cvs update command.  This 
  991.            uses any previous Argument, Directory, Entry, or Modified requests, 
  992.            if they have been sent.  The last Directory sent specifies the 
  993.            working directory at the time of the operation.  The -I option is 
  994.            not used--files which the client can decide whether to ignore are 
  995.            not mentioned and the client sends the Questionable request for 
  996.            others. 
  997.  
  998.  import \n 
  999.            Response expected: yes.  Actually do a cvs import command.  This 
  1000.            uses any previous Argument, Directory, Entry, or Modified requests, 
  1001.            if they have been sent.  The last Directory sent specifies the 
  1002.            working directory at the time of the operation - unlike most 
  1003.            commands, the repository field of each Directory request is ignored 
  1004.            (it merely must point somewhere within the root).  The files to be 
  1005.            imported are sent in Modified requests (files which the client knows 
  1006.            should be ignored are not sent; the server must still process the 
  1007.            CVSROOT/cvsignore file unless -I ! is sent).  A log message must 
  1008.            have been specified with a -m argument. 
  1009.  
  1010.  add \n 
  1011.            Response expected: yes.  Add a file or directory.  This uses any 
  1012.            previous Argument, Directory, Entry, or Modified requests, if they 
  1013.            have been sent.  The last Directory sent specifies the working 
  1014.            directory at the time of the operation. 
  1015.  
  1016.            To add a directory, send the directory to be added using Directory 
  1017.            and Argument requests.  For example: 
  1018.  
  1019.                       C: Root /u/cvsroot
  1020.                       ┬╖ . .
  1021.                       C: Argument nsdir
  1022.                       C: Directory nsdir
  1023.                       C: /u/cvsroot/1dir/nsdir
  1024.                       C: Directory .
  1025.                       C: /u/cvsroot/1dir
  1026.                       C: add
  1027.                       S: M Directory /u/cvsroot/1dir/nsdir added to the repository
  1028.                       S: ok
  1029.  
  1030.  You will notice that the server does not signal to the client in any 
  1031.  particular way that the directory has been successfully added.  The client is 
  1032.  supposed to just assume that the directory has been added and update its 
  1033.  records accordingly.  Note also that adding a directory is immediate; it does 
  1034.  not wait until a ci request as files do. 
  1035.  
  1036.  To add a file, send the file to be added using a Modified request.  For 
  1037.  example: 
  1038.  
  1039.                       C: Argument nfile
  1040.                       C: Directory .
  1041.                       C: /u/cvsroot/1dir
  1042.                       C: Modified nfile
  1043.                       C: u=rw,g=r,o=r
  1044.                       C: 6
  1045.                       C: hello
  1046.                       C: add
  1047.                       S: E cvs server: scheduling file `nfile' for addition
  1048.                       S: Mode u=rw,g=r,o=r
  1049.                       S: Checked-in ./
  1050.                       S: /u/cvsroot/1dir/nfile
  1051.                       S: /nfile/0///
  1052.                       S: E cvs server: use 'cvs commit' to add this file permanently
  1053.                       S: ok
  1054.  
  1055.  Note that the file has not been added to the repository; the only effect of a 
  1056.  successful add request, for a file, is to supply the client with a new entries 
  1057.  line containing '0' to indicate an added file. In fact, the client probably 
  1058.  could perform this operation without contacting the server, although using add 
  1059.  does cause the server to perform a few more checks. 
  1060.  
  1061.  The client sends a subsequent ci to actually add the file to the repository. 
  1062.  
  1063.  Another quirk of the add request is that with CVS 1.9 and older, a pathname 
  1064.  specified in an Argument request cannot contain '/'.  There is no good reason 
  1065.  for this restriction, and in fact more recent CVS servers don't have it. But 
  1066.  the way to interoperate with the older servers is to ensure that all Directory 
  1067.  requests for add (except those used to add directories, as described above), 
  1068.  use '.' for local-directory.  Specifying another string for local-directory 
  1069.  may not get an error, but it will get you strange Checked-in responses from 
  1070.  the buggy servers. 
  1071.  
  1072.  remove \n 
  1073.            Response expected: yes.  Remove a file.  This uses any previous 
  1074.            Argument, Directory, Entry, or Modified requests, if they have been 
  1075.            sent.  The last Directory sent specifies the working directory at 
  1076.            the time of the operation. 
  1077.  
  1078.            Note that this request does not actually do anything to the 
  1079.            repository; the only effect of a successful remove request is to 
  1080.            supply the client with a new entries line containing '-' to indicate 
  1081.            a removed file.  In fact, the client probably could perform this 
  1082.            operation without contacting the server, although using remove may 
  1083.            cause the server to perform a few more checks. 
  1084.  
  1085.            The client sends a subsequent ci request to actually record the 
  1086.            removal in the repository. 
  1087.  
  1088.  watch-on \n 
  1089.  
  1090.  watch-off \n 
  1091.  
  1092.  watch-add \n 
  1093.  
  1094.  watch-remove \n 
  1095.            Response expected: yes.  Actually do the cvs watch on, cvs watch 
  1096.            off, cvs watch add, and cvs watch remove commands, respectively. 
  1097.            This uses any previous Argument, Directory, Entry, or Modified 
  1098.            requests, if they have been sent.  The last Directory sent specifies 
  1099.            the working directory at the time of the operation. 
  1100.  
  1101.  release \n 
  1102.            Response expected: yes.  Note that a cvs release command has taken 
  1103.            place and update the history file accordingly. 
  1104.  
  1105.  noop \n 
  1106.            Response expected: yes.  This request is a null command in the sense 
  1107.            that it doesn't do anything, but merely (as with any other requests 
  1108.            expecting a response) sends back any responses pertaining to pending 
  1109.            errors, pending Notified responses, etc. 
  1110.  
  1111.  update-patches \n 
  1112.            Response expected: yes. This request does not actually do anything. 
  1113.            It is used as a signal that the server is able to generate patches 
  1114.            when given an update request.  The client must issue the -u argument 
  1115.            to update in order to receive patches. 
  1116.  
  1117.  gzip-file-contents level \n 
  1118.            Response expected: no.  Note that this request does not follow the 
  1119.            response convention stated above.  Gzip-stream is suggested instead 
  1120.            of gzip-file-contents as it gives better compression; the only 
  1121.            reason to implement the latter is to provide compression with CVS 
  1122.            1.8 and earlier.  The gzip-file-contents request asks the server to 
  1123.            compress files it sends to the client using gzip (RFC1952/1951) 
  1124.            compression, using the specified level of compression. If this 
  1125.            request is not made, the server must not compress files. 
  1126.  
  1127.            This is only a hint to the server.  It may still decide (for 
  1128.            example, in the case of very small files, or files that already 
  1129.            appear to be compressed) not to do the compression.  Compression is 
  1130.            indicated by a 'z' preceding the file length. 
  1131.  
  1132.            Availability of this request in the server indicates to the client 
  1133.            that it may compress files sent to the server, regardless of whether 
  1134.            the client actually uses this request. 
  1135.  
  1136.  wrapper-sendme-rcsOptions \n 
  1137.            Response expected: yes. Request that the server transmit mappings 
  1138.            from filenames to keyword expansion modes in Wrapper-rcsOption 
  1139.            responses. 
  1140.  
  1141.  other-request text \n 
  1142.            Response expected: yes. Any unrecognized request expects a response, 
  1143.            and does not contain any additional data.  The response will 
  1144.            normally be something like 'error  unrecognized request', but it 
  1145.            could be a different error if a previous request which doesn't 
  1146.            expect a response produced an error. 
  1147.  
  1148.  When the client is done, it drops the connection. 
  1149.  
  1150.  
  1151. ΓòÉΓòÉΓòÉ 6.9. Introduction to Responses ΓòÉΓòÉΓòÉ
  1152.  
  1153.  After a command which expects a response, the server sends however many of the 
  1154.  following responses are appropriate.  The server should not send data at other 
  1155.  times (the current implementation may violate this principle in a few minor 
  1156.  places, where the server is printing an error message and exiting---this 
  1157.  should be investigated further). 
  1158.  
  1159.  Any set of responses always ends with 'error' or 'ok'.  This indicates that 
  1160.  the response is over. 
  1161.  
  1162.  The responses Checked-in, New-entry, Updated, Created, Update-existing, 
  1163.  Merged, and Patched are refered to as file updating responses, because they 
  1164.  change the status of a file in the working directory in some way. The 
  1165.  responses Mode, Mod-time, and Checksum are referred to as file update 
  1166.  modifying responses because they modify the next file updating response.  In 
  1167.  no case shall a file update modifying response apply to a file updating 
  1168.  response other than the next one.  Nor can the same file update modifying 
  1169.  response occur twice for a given file updating response (if servers diagnose 
  1170.  this problem, it may aid in detecting the case where clients send an update 
  1171.  modifying response without following it by a file updating response). 
  1172.  
  1173.  
  1174. ΓòÉΓòÉΓòÉ 6.10. The "pathname" in responses ΓòÉΓòÉΓòÉ
  1175.  
  1176.  Many of the responses contain something called pathname. The name is somewhat 
  1177.  misleading; it actually indicates a pair of pathnames.  First, a local 
  1178.  directory name relative to the directory in which the command was given (i.e. 
  1179.  the last Directory before the command).  Then a linefeed and a repository 
  1180.  name.  Then a slash and the filename (without a ',v' ending). For example, for 
  1181.  a file 'i386.mh' which is in the local directory 'gas.clean/config' and for 
  1182.  which the repository is '/rel/cvsfiles/devo/gas/config': 
  1183.  
  1184.                       gas.clean/config/
  1185.                       /rel/cvsfiles/devo/gas/config/i386.mh
  1186.  
  1187.  If the server wants to tell the client to create a directory, then it merely 
  1188.  uses the directory in any response, as described above, and the client should 
  1189.  create the directory if it does not exist.  Note that this should only be done 
  1190.  one directory at a time, in order to permit the client to correctly store the 
  1191.  repository for each directory.  Servers can use requests such as Clear-sticky, 
  1192.  Clear-static-directory, or any other requests, to create directories. Some 
  1193.  server implementations may poorly distinguish between a directory which should 
  1194.  not exist and a directory which contains no files; in order to refrain from 
  1195.  creating empty directories a client should both send the '-P' option to update 
  1196.  or co, and should also detect the case in which the server asks to create a 
  1197.  directory but not any files within it (in that case the client should remove 
  1198.  the directory or refrain from creating it in the first place).  Note that 
  1199.  servers could clean this up greatly by only telling the client to create 
  1200.  directories if the directory in question should exist, but until servers do 
  1201.  this, clients will need to offer the '-P' behavior described above. 
  1202.  
  1203.  
  1204. ΓòÉΓòÉΓòÉ 6.11. Responses ΓòÉΓòÉΓòÉ
  1205.  
  1206.  Here are the responses: 
  1207.  
  1208.  Valid-requests request-list \n 
  1209.            Indicate what requests the server will accept.  request-list is a 
  1210.            space separated list of tokens.  If the server supports sending 
  1211.            patches, it will include 'update-patches' in this list.  The 
  1212.            'update-patches' request does not actually do anything. 
  1213.  
  1214.  Checked-in pathname \n 
  1215.            Additional data: New Entries line, \n.  This means a file pathname 
  1216.            has been successfully operated on (checked in, added, etc.).  name 
  1217.            in the Entries line is the same as the last component of pathname. 
  1218.  
  1219.  New-entry pathname \n 
  1220.            Additional data: New Entries line, \n.  Like Checked-in, but the 
  1221.            file is not up to date. 
  1222.  
  1223.  Updated pathname \n 
  1224.            Additional data: New Entries line, \n, mode, \n, file transmission. 
  1225.            A new copy of the file is enclosed.  This is used for a new revision 
  1226.            of an existing file, or for a new file, or for any other case in 
  1227.            which the local (client-side) copy of the file needs to be updated, 
  1228.            and after being updated it will be up to date.  If any directory in 
  1229.            pathname does not exist, create it.  This response is not used if 
  1230.            Created and Update-existing are supported. 
  1231.  
  1232.  Created pathname \n 
  1233.            This is just like Updated and takes the same additional data, but is 
  1234.            used only if no Entry, Modified, or Unchanged request has been sent 
  1235.            for the file in question.  The distinction between Created and 
  1236.            Update-existing is so that the client can give an error message in 
  1237.            several cases: (1) there is a file in the working directory, but not 
  1238.            one for which Entry, Modified, or Unchanged was sent (for example, a 
  1239.            file which was ignored, or a file for which Questionable was sent), 
  1240.            (2) there is a file in the working directory whose name differs from 
  1241.            the one mentioned in Created in ways that the client is unable to 
  1242.            use to distinguish files.  For example, the client is 
  1243.            case-insensitive and the names differ only in case. 
  1244.  
  1245.  Update-existing pathname \n 
  1246.            This is just like Updated and takes the same additional data, but is 
  1247.            used only if a Entry, Modified, or Unchanged request has been sent 
  1248.            for the file in question. 
  1249.  
  1250.            This response, or Merged, indicates that the server has determined 
  1251.            that it is OK to overwrite the previous contents of the file 
  1252.            specified by pathname.  Provided that the client has correctly sent 
  1253.            Modified or Is-modified requests for a modified file, and the file 
  1254.            was not modified while CVS was running, the server can ensure that a 
  1255.            user's modifications are not lost. 
  1256.  
  1257.  Merged pathname \n 
  1258.            This is just like Updated and takes the same additional data, with 
  1259.            the one difference that after the new copy of the file is enclosed, 
  1260.            it will still not be up to date.  Used for the results of a merge, 
  1261.            with or without conflicts. 
  1262.  
  1263.            It is useful to preserve an copy of what the file looked like before 
  1264.            the merge.  This is basically handled by the server; before sending 
  1265.            Merged it will send a Copy-file response.  For example, if the file 
  1266.            is 'aa' and it derives from revision 1.3, the Copy-file response 
  1267.            will tell the client to copy 'aa' to '.#aa.1.3'.  It is up to the 
  1268.            client to decide how long to keep this file around; traditionally 
  1269.            clients have left it around forever, thus letting the user clean it 
  1270.            up as desired.  But another answer, such as until the next commit, 
  1271.            might be preferable. 
  1272.  
  1273.  Rcs-diff pathname \n 
  1274.            This is just like Updated and takes the same additional data, with 
  1275.            the one difference that instead of sending a new copy of the file, 
  1276.            the server sends an RCS change text.  This change text is produced 
  1277.            by 'diff -n' (the GNU diff '-a' option may also be used).  The 
  1278.            client must apply this change text to the existing file.  This will 
  1279.            only be used when the client has an exact copy of an earlier 
  1280.            revision of a file.  This response is only used if the update 
  1281.            command is given the '-u' argument. 
  1282.  
  1283.  Patched pathname \n 
  1284.            This is just like Rcs-diff and takes the same additional data, 
  1285.            except that it sends a standard patch rather than an RCS change 
  1286.            text. The patch is produced by 'diff -c' for CVS 1.6 and later (see 
  1287.            POSIX.2 for a description of this format), or 'diff -u' for previous 
  1288.            versions of CVS; clients are encouraged to accept either format. 
  1289.            Like Rcs-diff, this response is only used if the update command is 
  1290.            given the '-u' argument. 
  1291.  
  1292.            The Patched response is deprecated in favor of the Rcs-diff 
  1293.            response.  However, older clients (CVS 1.9 and earlier) only support 
  1294.            Patched. 
  1295.  
  1296.  Mode mode \n 
  1297.            This mode applies to the next file mentioned in Checked-in.  Mode is 
  1298.            a file update modifying response as described in Response intro. 
  1299.  
  1300.  Mod-time time \n 
  1301.            Set the modification time of the next file sent to time. Mod-time is 
  1302.            a file update modifying response as described in Response intro. The 
  1303.            time is in the format specified by RFC822 as modified by RFC1123. 
  1304.            The server may specify any timezone it chooses; clients will want to 
  1305.            convert that to their own timezone as appropriate.  An example of 
  1306.            this format is: 
  1307.  
  1308.                       26 May 1997 13:01:40 -0400
  1309.  
  1310.  There is no requirement that the client and server clocks be synchronized. 
  1311.  The server just sends its recommendation for a timestamp (based on its own 
  1312.  clock, presumably), and the client should just believe it (this means that the 
  1313.  time might be in the future, for example). 
  1314.  
  1315.  If the server does not send Mod-time for a given file, the client should pick 
  1316.  a modification time in the usual way (usually, just let the operating system 
  1317.  set the modification time to the time that the CVS command is running). 
  1318.  
  1319.  Checksum checksum\n 
  1320.            The checksum applies to the next file sent (that is, Checksum is a 
  1321.            file update modifying response as described in Response intro). In 
  1322.            the case of Patched, the checksum applies to the file after being 
  1323.            patched, not to the patch itself.  The client should compute the 
  1324.            checksum itself, after receiving the file or patch, and signal an 
  1325.            error if the checksums do not match.  The checksum is the 128 bit 
  1326.            MD5 checksum represented as 32 hex digits (MD5 is described in 
  1327.            RFC1321). This response is optional, and is only used if the client 
  1328.            supports it (as judged by the Valid-responses request). 
  1329.  
  1330.  Copy-file pathname \n 
  1331.            Additional data: newname \n.  Copy file pathname to newname in the 
  1332.            same directory where it already is.  This does not affect 
  1333.            CVS/Entries. 
  1334.  
  1335.            This can optionally be implemented as a rename instead of a copy. 
  1336.            The only use for it which currently has been identified is prior to 
  1337.            a Merged response as described under Merged.  Clients can probably 
  1338.            assume that is how it is being used, if they want to worry about 
  1339.            things like how long to keep the newname file around. 
  1340.  
  1341.  Removed pathname \n 
  1342.            The file has been removed from the repository (this is the case 
  1343.            where cvs prints 'file foobar.c is no longer pertinent'). 
  1344.  
  1345.  Remove-entry pathname \n 
  1346.            The file needs its entry removed from CVS/Entries, but the file 
  1347.            itself is already gone (this happens in response to a ci request 
  1348.            which involves committing the removal of a file). 
  1349.  
  1350.  Set-static-directory pathname \n 
  1351.            This instructs the client to set the Entries.Static flag, which it 
  1352.            should then send back to the server in a Static-directory request 
  1353.            whenever the directory is operated on.  pathname ends in a slash; 
  1354.            its purpose is to specify a directory, not a file within a 
  1355.            directory. 
  1356.  
  1357.  Clear-static-directory pathname \n 
  1358.            Like Set-static-directory, but clear, not set, the flag. 
  1359.  
  1360.  Set-sticky pathname \n 
  1361.            Additional data: tagspec \n.  Tell the client to set a sticky tag or 
  1362.            date, which should be supplied with the Sticky request for future 
  1363.            operations.  pathname ends in a slash; its purpose is to specify a 
  1364.            directory, not a file within a directory.  The client should store 
  1365.            tagspec and pass it back to the server as-is, to allow for future 
  1366.            expansion.  The first character of tagspec is 'T' for a tag, 'D' for 
  1367.            a date, or something else for future expansion.  The remainder of 
  1368.            tagspec contains the actual tag or date. 
  1369.  
  1370.  Clear-sticky pathname \n 
  1371.            Clear any sticky tag or date set by Set-sticky. 
  1372.  
  1373.  Template pathname \n 
  1374.            Additional data: file transmission (note: compressed file 
  1375.            transmissions are not supported).  pathname ends in a slash; its 
  1376.            purpose is to specify a directory, not a file within a directory. 
  1377.            Tell the client to store the file transmission as the template log 
  1378.            message, and then use that template in the future when prompting the 
  1379.            user for a log message. 
  1380.  
  1381.  Set-checkin-prog dir \n 
  1382.            Additional data: prog \n.  Tell the client to set a checkin program, 
  1383.            which should be supplied with the Checkin-prog request for future 
  1384.            operations. 
  1385.  
  1386.  Set-update-prog dir \n 
  1387.            Additional data: prog \n.  Tell the client to set an update program, 
  1388.            which should be supplied with the Update-prog request for future 
  1389.            operations. 
  1390.  
  1391.  Notified pathname \n 
  1392.            Indicate to the client that the notification for pathname has been 
  1393.            done.  There should be one such response for every Notify request; 
  1394.            if there are several Notify requests for a single file, the requests 
  1395.            should be processed in order; the first Notified response pertains 
  1396.            to the first Notify request, etc. 
  1397.  
  1398.  Module-expansion pathname \n 
  1399.            Return a file or directory which is included in a particular module. 
  1400.            pathname is relative to cvsroot, unlike most pathnames in responses. 
  1401.            pathname should be used to look and see whether some or all of the 
  1402.            module exists on the client side; it is not necessarily suitable for 
  1403.            passing as an argument to a co request (for example, if the modules 
  1404.            file contains the '-d' option, it will be the directory specified 
  1405.            with '-d', not the name of the module). 
  1406.  
  1407.  Wrapper-rcsOption pattern -k 'option' \n 
  1408.            Transmit to the client a filename pattern which implies a certain 
  1409.            keyword expansion mode.  The pattern is a wildcard pattern (for 
  1410.            example, '*.exe'.  The option is 'b' for binary, and so on.  Note 
  1411.            that although the syntax happens to resemble the syntax in certain 
  1412.            CVS configuration files, it is more constrained; there must be 
  1413.            exactly one space between pattern and '-k' and exactly one space 
  1414.            between '-k' and ''', and no string is permitted in place of '-k' 
  1415.            (extensions should be done with new responses, not by extending this 
  1416.            one, for graceful handling of Valid-responses). 
  1417.  
  1418.  M text \n 
  1419.            A one-line message for the user. Note that the format of text is not 
  1420.            designed for machine parsing. Although sometimes scripts and clients 
  1421.            will have little choice, the exact text which is output is subject 
  1422.            to vary at the discretion of the server and the example output given 
  1423.            in this document is just that, example output.  Servers are 
  1424.            encouraged to use the 'MT' response, and future versions of this 
  1425.            document will hopefully standardize more of the 'MT' tags; see Text 
  1426.            tags. 
  1427.  
  1428.  Mbinary \n 
  1429.            Additional data: file transmission (note: compressed file 
  1430.            transmissions are not supported).  This is like 'M', except the 
  1431.            contents of the file transmission are binary and should be copied to 
  1432.            standard output without translation to local text file conventions. 
  1433.            To transmit a text file to standard output, servers should use a 
  1434.            series of 'M' requests. 
  1435.  
  1436.  E text \n 
  1437.            Same as M but send to stderr not stdout. 
  1438.  
  1439.  F \n 
  1440.            Flush stderr.  That is, make it possible for the user to see what 
  1441.            has been written to stderr (it is up to the implementation to decide 
  1442.            exactly how far it should go to ensure this). 
  1443.  
  1444.  MT tagname data \n 
  1445.            This response provides for tagged text.  It is similar to 
  1446.            SGML/HTML/XML in that the data is structured and a naive application 
  1447.            can also make some sense of it without understanding the structure. 
  1448.            The syntax is not SGML-like, however, in order to fit into the CVS 
  1449.            protocol better and (more importantly) to make it easier to parse, 
  1450.            especially in a language like perl or awk. 
  1451.  
  1452.            The tagname can have several forms.  If it starts with 'a' to 'z' or 
  1453.            'A' to 'Z', then it represents tagged text. If the implementation 
  1454.            recognizes tagname, then it may interpret data in some particular 
  1455.            fashion.  If the implementation does not recognize tagname, then it 
  1456.            should simply treat data as text to be sent to the user (similar to 
  1457.            an 'M' response).  There are two tags which are general purpose. 
  1458.            The 'text' tag is similar to an unrecognized tag in that it provides 
  1459.            text which will ordinarily be sent to the user.  The 'newline' tag 
  1460.            is used without data and indicates that a newline will ordinarily be 
  1461.            sent to the user (there is no provision for embedding newlines in 
  1462.            the data of other tagged text responses). 
  1463.  
  1464.            If tagname starts with '+' it indicates a start tag and if it starts 
  1465.            with '-' it indicates an end tag.  The remainder of tagname should 
  1466.            be the same for matching start and end tags, and tags should be 
  1467.            nested (for example one could have tags in the following order +bold 
  1468.            +italic text -italic -bold but not +bold +italic text -bold 
  1469.            -italic).  A particular start and end tag may be documented to 
  1470.            constrain the tagged text responses which are valid between them. 
  1471.  
  1472.            Note that if data is present there will always be exactly one space 
  1473.            between tagname and data; if there is more than one space, then the 
  1474.            spaces beyond the first are part of data. 
  1475.  
  1476.            Here is an example of some tagged text responses.  Note that there 
  1477.            is a trailing space after 'Checking in' and 'initial revision:' and 
  1478.            there are two trailing spaces after '<--'.  Such trailing spaces 
  1479.            are, of course, part of data. 
  1480.  
  1481.                       MT +checking-in
  1482.                       MT text Checking in
  1483.                       MT fname gz.tst
  1484.                       MT text ;
  1485.                       MT newline
  1486.                       MT rcsfile /home/kingdon/zwork/cvsroot/foo/gz.tst,v
  1487.                       MT text  <--
  1488.                       MT fname gz.tst
  1489.                       MT newline
  1490.                       MT text initial revision:
  1491.                       MT init-rev 1.1
  1492.                       MT newline
  1493.                       MT text done
  1494.                       MT newline
  1495.                       MT -checking-in
  1496.  
  1497.  If the client does not support the 'MT' response, the same responses might be 
  1498.  sent as: 
  1499.  
  1500.                       M Checking in gz.tst;
  1501.                       M /home/kingdon/zwork/cvsroot/foo/gz.tst,v  <--  gz.tst
  1502.                       M initial revision: 1.1
  1503.                       M done
  1504.  
  1505.  For a list of specific tags, see Text tags. 
  1506.  
  1507.  error errno-code ' ' text \n 
  1508.            The command completed with an error.  errno-code is a symbolic error 
  1509.            code (e.g. ENOENT); if the server doesn't support this feature, or 
  1510.            if it's not appropriate for this particular message, it just omits 
  1511.            the errno-code (in that case there are two spaces after 'error'). 
  1512.            Text is an error message such as that provided by strerror(), or any 
  1513.            other message the server wants to use. The text is like the M 
  1514.            response, in the sense that it is not particularly intended to be 
  1515.            machine-parsed; servers may wish to print an error message with MT 
  1516.            responses, and then issue a error response without text (although it 
  1517.            should be noted that MT currently has no way of flagging the output 
  1518.            as intended for standard error, the way that the E response does). 
  1519.  
  1520.  ok \n 
  1521.            The command completed successfully. 
  1522.  
  1523.  
  1524. ΓòÉΓòÉΓòÉ 6.12. Tags for the MT tagged text response ΓòÉΓòÉΓòÉ
  1525.  
  1526.  The MT response, as described in Responses, offers a way for the server to 
  1527.  send tagged text to the client.  This section describes specific tags.  The 
  1528.  intention is to update this section as servers add new tags. 
  1529.  
  1530.  In the following descriptions, text and newline tags are omitted.  Such tags 
  1531.  contain information which is intended for users (or to be discarded), and are 
  1532.  subject to change at the whim of the server. To avoid being vulnerable to such 
  1533.  whim, clients should look for the tags listed here, not text, newline, or 
  1534.  other tags. 
  1535.  
  1536.  The following tag means to indicate to the user that a file has been updated. 
  1537.  It is more or less redundant with the Created and Update-existing responses, 
  1538.  but we don't try to specify here whether it occurs in exactly the same 
  1539.  circumstances as Created and Update-existing.  The name is the pathname of the 
  1540.  file being updated relative to the directory in which the command is occurring 
  1541.  (that is, the last Directory request which is sent before the command). 
  1542.  
  1543.                       MT +updated
  1544.                       MT fname name
  1545.                       MT -updated
  1546.  
  1547.  The importmergecmd tag is used when doing an import which has conflicts.  The 
  1548.  client can use it to report how to merge in the newly imported changes.  The 
  1549.  count is the number of conflicts.  The newly imported changes can be merged by 
  1550.  running the following command: 
  1551.  
  1552.                       cvs checkout -j tag1 -j tag2 repository
  1553.  
  1554.                       MT +importmergecmd
  1555.                       MT conflicts count
  1556.                       MT mergetag1 tag1
  1557.                       MT mergetag2 tag2
  1558.                       MT repository repository
  1559.                       MT -importmergecmd
  1560.  
  1561.  
  1562. ΓòÉΓòÉΓòÉ 6.13. Example ΓòÉΓòÉΓòÉ
  1563.  
  1564.  Here is an example; lines are prefixed by 'C: ' to indicate the client sends 
  1565.  them or 'S: ' to indicate the server sends them. 
  1566.  
  1567.  The client starts by connecting, sending the root, and completing the protocol 
  1568.  negotiation.  In actual practice the lists of valid responses and requests 
  1569.  would be longer. 
  1570.  
  1571.                       C: Root /u/cvsroot
  1572.                       C: Valid-responses ok error Checked-in M E
  1573.                       C: valid-requests
  1574.                       S: Valid-requests Root Directory Entry Modified Argument Argumentx ci co
  1575.                       S: ok
  1576.                       C: UseUnchanged
  1577.  
  1578.  The client wants to check out the supermunger module into a fresh working 
  1579.  directory.  Therefore it first expands the supermunger module; this step would 
  1580.  be omitted if the client was operating on a directory rather than a module. 
  1581.  
  1582.                       C: Argument supermunger
  1583.                       C: Directory .
  1584.                       C: /u/cvsroot
  1585.                       C: expand-modules
  1586.  
  1587.  The server replies that the supermunger module expands to the directory 
  1588.  supermunger (the simplest case): 
  1589.  
  1590.                       S: Module-expansion supermunger
  1591.                       S: ok
  1592.  
  1593.  The client then proceeds to check out the directory.  The fact that it sends 
  1594.  only a single Directory request which specifies '.' for the working directory 
  1595.  means that there is not already a supermunger directory on the client. 
  1596.  
  1597.                       C: Argument -N
  1598.                       C: Argument supermunger
  1599.                       C: Directory .
  1600.                       C: /u/cvsroot
  1601.                       C: co
  1602.  
  1603.  The server replies with the requested files.  In this example, there is only 
  1604.  one file, 'mungeall.c'.  The Clear-sticky and Clear-static-directory requests 
  1605.  are sent by the current implementation but they have no effect because the 
  1606.  default is for those settings to be clear when a directory is newly created. 
  1607.  
  1608.                       S: Clear-sticky supermunger/
  1609.                       S: /u/cvsroot/supermunger/
  1610.                       S: Clear-static-directory supermunger/
  1611.                       S: /u/cvsroot/supermunger/
  1612.                       S: E cvs server: Updating supermunger
  1613.                       S: M U supermunger/mungeall.c
  1614.                       S: Created supermunger/
  1615.                       S: /u/cvsroot/supermunger/mungeall.c
  1616.                       S: /mungeall.c/1.1///
  1617.                       S: u=rw,g=r,o=r
  1618.                       S: 26
  1619.                       S: int mein () { abort (); }
  1620.                       S: ok
  1621.  
  1622.  The current client implementation would break the connection here and make a 
  1623.  new connection for the next command.  However, the protocol allows it to keep 
  1624.  the connection open and continue, which is what we show here. 
  1625.  
  1626.  After the user modifies the file and instructs the client to check it back in. 
  1627.  The client sends arguments to specify the log message and file to check in: 
  1628.  
  1629.                       C: Argument -m
  1630.                       C: Argument Well, you see, it took me hours and hours to find
  1631.                       C: Argumentx this typo and I searched and searched and eventually
  1632.                       C: Argumentx had to ask John for help.
  1633.                       C: Argument mungeall.c
  1634.  
  1635.  It also sends information about the contents of the working directory, 
  1636.  including the new contents of the modified file.  Note that the user has 
  1637.  changed into the 'supermunger' directory before executing this command; the 
  1638.  top level directory is a user-visible concept because the server should print 
  1639.  filenames in M and E responses relative to that directory. 
  1640.  
  1641.                       C: Directory .
  1642.                       C: /u/cvsroot/supermunger
  1643.                       C: Entry /mungeall.c/1.1///
  1644.                       C: Modified mungeall.c
  1645.                       C: u=rw,g=r,o=r
  1646.                       C: 26
  1647.                       C: int main () { abort (); }
  1648.  
  1649.  And finally, the client issues the checkin command (which makes use of the 
  1650.  data just sent): 
  1651.  
  1652.                       C: ci
  1653.  
  1654.  And the server tells the client that the checkin succeeded: 
  1655.  
  1656.                       S: M Checking in mungeall.c;
  1657.                       S: E /u/cvsroot/supermunger/mungeall.c,v  <--  mungeall.c
  1658.                       S: E new revision: 1.2; previous revision: 1.1
  1659.                       S: E done
  1660.                       S: Mode u=rw,g=r,o=r
  1661.                       S: Checked-in ./
  1662.                       S: /u/cvsroot/supermunger/mungeall.c
  1663.                       S: /mungeall.c/1.2///
  1664.                       S: ok
  1665.  
  1666.  
  1667. ΓòÉΓòÉΓòÉ 6.14. Required versus optional parts of the protocol ΓòÉΓòÉΓòÉ
  1668.  
  1669.  The following are part of every known implementation of the CVS protocol 
  1670.  (except obsolete, pre-1.5, versions of CVS) and it is considered reasonable 
  1671.  behavior to completely fail to work if you are connected with an 
  1672.  implementation which attempts to not support them.  Requests: Root, 
  1673.  Valid-responses, valid-requests, Directory, Entry, Modified, Unchanged, 
  1674.  Argument, Argumentx, ci, co, update. Responses: ok, error, Valid-requests, 
  1675.  Checked-in, Updated, Merged, Removed, M, E. 
  1676.  
  1677.  A server need not implement Repository, but in order to interoperate with CVS 
  1678.  1.5 through 1.9 it must claim to implement it (in Valid-requests).  The client 
  1679.  will not actually send the request. 
  1680.  
  1681.  
  1682. ΓòÉΓòÉΓòÉ 6.15. Obsolete protocol elements ΓòÉΓòÉΓòÉ
  1683.  
  1684.  This section briefly describes protocol elements which are obsolete. There is 
  1685.  no attempt to document them in full detail. 
  1686.  
  1687.  There was a Repository request which was like Directory except it only 
  1688.  provided repository, and the local directory was assumed to be similarly 
  1689.  named. 
  1690.  
  1691.  If the UseUnchanged request was not sent, there was a Lost request which was 
  1692.  sent to indicate that a file did not exist in the working directory, and the 
  1693.  meaning of sending Entries without Lost or Modified was different.  All 
  1694.  current clients (CVS 1.5 and later) will send UseUnchanged if it is supported. 
  1695.  
  1696.  
  1697. ΓòÉΓòÉΓòÉ 7. Notes on the Protocol ΓòÉΓòÉΓòÉ
  1698.  
  1699.  A number of enhancements are possible.  Also see the file TODO in the CVS 
  1700.  source distribution, which has further ideas concerning various aspects of 
  1701.  CVS, some of which impact the protocol. Similarly, the http://www.cyclic.com 
  1702.  site, in particular the Development of CVS page. 
  1703.  
  1704.      The Modified request could be speeded up by sending diffs rather than 
  1705.       entire files.  The client would need some way to keep the version of the 
  1706.       file which was originally checked out; probably requiring the use of "cvs 
  1707.       edit" in this case is the most sensible course (the "cvs edit" could be 
  1708.       handled by a package like VC for emacs).  This would also allow local 
  1709.       operation of cvs diff without arguments. 
  1710.  
  1711.      The fact that pserver requires an extra network turnaround in order to 
  1712.       perform authentication would be nice to avoid.  This relates to the issue 
  1713.       of reporting errors; probably the clean solution is to defer the error 
  1714.       until the client has issued a request which expects a response.  To some 
  1715.       extent this might relate to the next item (in terms of how easy it is to 
  1716.       skip a whole bunch of requests until we get to one that expects a 
  1717.       response).  I know that the kerberos code doesn't wait in this fashion, 
  1718.       but that probably can cause network deadlocks and perhaps future problems 
  1719.       running over a transport which is more transaction oriented than TCP.  On 
  1720.       the other hand I'm not sure it is wise to make the client conduct a 
  1721.       lengthy upload only to find there is an authentication failure. 
  1722.  
  1723.      The protocol uses an extra network turnaround for protocol negotiation 
  1724.       (valid-requests).  It might be nice to avoid this by having the client be 
  1725.       able to send requests and tell the server to ignore them if they are 
  1726.       unrecognized (different requests could produce a fatal error if 
  1727.       unrecognized).  To do this there should be a standard syntax for 
  1728.       requests.  For example, perhaps all future requests should be a single 
  1729.       line, with mechanisms analogous to Argumentx, or several requests working 
  1730.       together, to provide greater amounts of information.  Or there might be a 
  1731.       standard mechanism for counted data (analogous to that used by Modified) 
  1732.       or continuation lines (like a generalized Argumentx).  It would be useful 
  1733.       to compare what HTTP is planning in this area; last I looked they were 
  1734.       contemplating something called Protocol Extension Protocol but I haven't 
  1735.       looked at the relevant IETF documents in any detail.  Obviously, we want 
  1736.       something as simple as possible (but no simpler). 
  1737.  
  1738.      The scrambling algorithm in the CVS client and server actually support 
  1739.       more characters than those documented in Password scrambling. Someday we 
  1740.       are going to either have to document them all (but this is not as easy as 
  1741.       it may look, see below), or (gradually and with adequate process) phase 
  1742.       out the support for other characters in the CVS implementation.  This 
  1743.       business of having the feature partly undocumented isn't a desirable 
  1744.       state long-term. 
  1745.  
  1746.       The problem with documenting other characters is that unless we know what 
  1747.       character set is in use, there is no way to make a password portable from 
  1748.       one system to another.  For example, a with a circle on top might have 
  1749.       different encodings in different character sets. 
  1750.  
  1751.       It almost works to say that the client picks an arbitrary, unknown 
  1752.       character set (indeed, having the CVS client know what character set the 
  1753.       user has in mind is a hard problem otherwise), and scrambles according to 
  1754.       a certain octet<->octet mapping.  There are two problems with this.  One 
  1755.       is that the protocol has no way to transmit character 10 decimal 
  1756.       (linefeed), and the current server and clients have no way to handle 0 
  1757.       decimal (NUL).  This may cause problems with certain multibyte character 
  1758.       sets, in which octets 10 and 0 will appear in the middle of other 
  1759.       characters.  The other problem, which is more minor and possibly not 
  1760.       worth worrying about, is that someone can type a password on one system 
  1761.       and then go to another system which uses a different encoding for the 
  1762.       same characters, and have their password not work. 
  1763.  
  1764.       The restriction to the ISO646 invariant subset is the best approach for 
  1765.       strings which are not particularly significant to users.  Passwords are 
  1766.       visible enough that this is somewhat doubtful as applied here.  ISO646 
  1767.       does, however, have the virtue (!?) of offending everyone.  It is easy to 
  1768.       say "But the $ is right on people's keyboards!  Surely we can't forbid 
  1769.       that".  From a human factors point of view, that makes quite a bit of 
  1770.       sense.  The contrary argument, of course, is that a with a circle on top, 
  1771.       or some of the characters poorly handled by Unicode, are on someone's 
  1772.       keyboard. 
  1773.