xref: /openbsd-src/gnu/usr.bin/cvs/doc/cvsclient.info-2 (revision 43c1707e6f6829177cb1974ee6615ce6c1307689)
1e77048c1StholoThis is cvsclient.info, produced by makeinfo version 4.0 from
2*43c1707eStholocvsclient.texi.
3f79d7d1bStholo
4e77048c1StholoINFO-DIR-SECTION Programming
5e77048c1StholoSTART-INFO-DIR-ENTRY
6e77048c1Stholo* cvsclient: (cvsclient).      The CVS client/server protocol.
7e77048c1StholoEND-INFO-DIR-ENTRY
8e77048c1Stholo
9f79d7d1bStholo
106407bc5bStholoFile: cvsclient.info,  Node: Requests,  Next: Response intro,  Prev: Request intro,  Up: Protocol
116407bc5bStholo
126407bc5bStholoRequests
136407bc5bStholo========
146407bc5bStholo
156407bc5bStholo   Here are the requests:
166407bc5bStholo
176407bc5bStholo`Root PATHNAME \n'
186407bc5bStholo     Response expected: no.  Tell the server which `CVSROOT' to use.
192f9d2fd9Stholo     Note that PATHNAME is a local directory and _not_ a fully
206407bc5bStholo     qualified `CVSROOT' variable.  PATHNAME must already exist; if
216407bc5bStholo     creating a new root, use the `init' request, not `Root'.  PATHNAME
226407bc5bStholo     does not include the hostname of the server, how to access the
236407bc5bStholo     server, etc.; by the time the CVS protocol is in use, connection,
246407bc5bStholo     authentication, etc., are already taken care of.
256407bc5bStholo
266407bc5bStholo     The `Root' request must be sent only once, and it must be sent
276407bc5bStholo     before any requests other than `Valid-responses',
28e77048c1Stholo     `valid-requests', `UseUnchanged', `Set', `Global_option', `init',
29e77048c1Stholo     `noop', or `version'.
306407bc5bStholo
316407bc5bStholo`Valid-responses REQUEST-LIST \n'
326407bc5bStholo     Response expected: no.  Tell the server what responses the client
336407bc5bStholo     will accept.  request-list is a space separated list of tokens.
34e77048c1Stholo     The `Root' request need not have been previously sent.
356407bc5bStholo
366407bc5bStholo`valid-requests \n'
376407bc5bStholo     Response expected: yes.  Ask the server to send back a
38e77048c1Stholo     `Valid-requests' response.  The `Root' request need not have been
39e77048c1Stholo     previously sent.
406407bc5bStholo
416407bc5bStholo`Directory LOCAL-DIRECTORY \n'
426407bc5bStholo     Additional data: REPOSITORY \n.  Response expected: no.  Tell the
436407bc5bStholo     server what directory to use.  The REPOSITORY should be a
446407bc5bStholo     directory name from a previous server response.  Note that this
456407bc5bStholo     both gives a default for `Entry' and `Modified' and also for `ci'
466407bc5bStholo     and the other commands; normal usage is to send `Directory' for
476407bc5bStholo     each directory in which there will be an `Entry' or `Modified',
486407bc5bStholo     and then a final `Directory' for the original directory, then the
496407bc5bStholo     command.  The LOCAL-DIRECTORY is relative to the top level at
506407bc5bStholo     which the command is occurring (i.e. the last `Directory' which is
516407bc5bStholo     sent before the command); to indicate that top level, `.' should
52d794bb93Stholo     be sent for LOCAL-DIRECTORY.
536407bc5bStholo
546407bc5bStholo     Here is an example of where a client gets REPOSITORY and
556407bc5bStholo     LOCAL-DIRECTORY.  Suppose that there is a module defined by
566407bc5bStholo
576407bc5bStholo          moddir 1dir
586407bc5bStholo
596407bc5bStholo     That is, one can check out `moddir' and it will take `1dir' in the
606407bc5bStholo     repository and check it out to `moddir' in the working directory.
616407bc5bStholo     Then an initial check out could proceed like this:
626407bc5bStholo
636407bc5bStholo          C: Root /home/kingdon/zwork/cvsroot
646407bc5bStholo          . . .
656407bc5bStholo          C: Argument moddir
666407bc5bStholo          C: Directory .
676407bc5bStholo          C: /home/kingdon/zwork/cvsroot
686407bc5bStholo          C: co
696407bc5bStholo          S: Clear-sticky moddir/
706407bc5bStholo          S: /home/kingdon/zwork/cvsroot/1dir/
716407bc5bStholo          . . .
726407bc5bStholo          S: ok
736407bc5bStholo
746407bc5bStholo     In this example the response shown is `Clear-sticky', but it could
756407bc5bStholo     be another response instead.  Note that it returns two pathnames.
766407bc5bStholo     The first one, `moddir/', indicates the working directory to check
776407bc5bStholo     out into.  The second one, ending in `1dir/', indicates the
786407bc5bStholo     directory to pass back to the server in a subsequent `Directory'
796407bc5bStholo     request.  For example, a subsequent `update' request might look
806407bc5bStholo     like:
816407bc5bStholo
826407bc5bStholo          C: Directory moddir
836407bc5bStholo          C: /home/kingdon/zwork/cvsroot/1dir
846407bc5bStholo          . . .
856407bc5bStholo          C: update
866407bc5bStholo
876407bc5bStholo     For a given LOCAL-DIRECTORY, the repository will be the same for
886407bc5bStholo     each of the responses, so one can use the repository from whichever
896407bc5bStholo     response is most convenient.  Typically a client will store the
906407bc5bStholo     repository along with the sources for each LOCAL-DIRECTORY, use
916407bc5bStholo     that same setting whenever operating on that LOCAL-DIRECTORY, and
926407bc5bStholo     not update the setting as long as the LOCAL-DIRECTORY exists.
936407bc5bStholo
946407bc5bStholo     A client is free to rename a LOCAL-DIRECTORY at any time (for
956407bc5bStholo     example, in response to an explicit user request).  While it is
966407bc5bStholo     true that the server supplies a LOCAL-DIRECTORY to the client, as
976407bc5bStholo     noted above, this is only the default place to put the directory.
986407bc5bStholo     Of course, the various `Directory' requests for a single command
996407bc5bStholo     (for example, `update' or `ci' request) should name a particular
1006407bc5bStholo     directory with the same LOCAL-DIRECTORY.
1016407bc5bStholo
1026407bc5bStholo     Each `Directory' request specifies a brand-new LOCAL-DIRECTORY and
1036407bc5bStholo     REPOSITORY; that is, LOCAL-DIRECTORY and REPOSITORY are never
1046407bc5bStholo     relative to paths specified in any previous `Directory' request.
1056407bc5bStholo
1068506102dStholo     Here's a more complex example, in which we request an update of a
1078506102dStholo     working directory which has been checked out from multiple places
1088506102dStholo     in the repository.
1098506102dStholo
1108506102dStholo          C: Argument dir1
1118506102dStholo          C: Directory dir1
1128506102dStholo          C: /home/foo/repos/mod1
1138506102dStholo          . . .
1148506102dStholo          C: Argument dir2
1158506102dStholo          C: Directory dir2
1168506102dStholo          C: /home/foo/repos/mod2
1178506102dStholo          . . .
1188506102dStholo          C: Argument dir3
1198506102dStholo          C: Directory dir3/subdir3
1208506102dStholo          C: /home/foo/repos/mod3
1218506102dStholo          . . .
1228506102dStholo          C: update
1238506102dStholo
1248506102dStholo     While directories `dir1' and `dir2' will be handled in similar
1258506102dStholo     fashion to the other examples given above, `dir3' is slightly
1268506102dStholo     different from the server's standpoint.  Notice that module `mod3'
1278506102dStholo     is actually checked out into `dir3/subdir3', meaning that directory
1288506102dStholo     `dir3' is either empty or does not contain data checked out from
1298506102dStholo     this repository.
1308506102dStholo
1318506102dStholo     The above example will work correctly in CVS 1.10.1 and later.  The
1328506102dStholo     server will descend the tree starting from all directories
1338506102dStholo     mentioned in `Argument' requests and update those directories
1348506102dStholo     specifically mentioned in `Directory' requests.
1358506102dStholo
1368506102dStholo     Previous versions of CVS (1.10 and earlier) do not behave the same
1378506102dStholo     way.  While the descent of the tree begins at all directories
1388506102dStholo     mentioned in `Argument' requests, descent into subdirectories only
1398506102dStholo     occurs if a directory has been mentioned in a `Directory' request.
1408506102dStholo     Therefore, the above example would succeed in updating `dir1' and
1418506102dStholo     `dir2', but would skip `dir3' because that directory was not
1428506102dStholo     specifically mentioned in a `Directory' request.  A functional
1438506102dStholo     version of the above that would run on a 1.10 or earlier server is
1448506102dStholo     as follows:
1458506102dStholo
1468506102dStholo          C: Argument dir1
1478506102dStholo          C: Directory dir1
1488506102dStholo          C: /home/foo/repos/mod1
1498506102dStholo          . . .
1508506102dStholo          C: Argument dir2
1518506102dStholo          C: Directory dir2
1528506102dStholo          C: /home/foo/repos/mod2
1538506102dStholo          . . .
1548506102dStholo          C: Argument dir3
1558506102dStholo          C: Directory dir3
1568506102dStholo          C: /home/foo/repos/.
1578506102dStholo          . . .
1588506102dStholo          C: Directory dir3/subdir3
1598506102dStholo          C: /home/foo/repos/mod3
1608506102dStholo          . . .
1618506102dStholo          C: update
1628506102dStholo
1638506102dStholo     Note the extra `Directory dir3' request.  It might be better to use
1648506102dStholo     `Emptydir' as the repository for the `dir3' directory, but the
1658506102dStholo     above will certainly work.
1668506102dStholo
1678506102dStholo     One more peculiarity of the 1.10 and earlier protocol is the
1688506102dStholo     ordering of `Directory' arguments.  In order for a subdirectory to
1698506102dStholo     be registered correctly for descent by the recursion processor,
1708506102dStholo     its parent must be sent first.  For example, the following would
1718506102dStholo     not work to update `dir3/subdir3':
1728506102dStholo
1738506102dStholo          . . .
1748506102dStholo          C: Argument dir3
1758506102dStholo          C: Directory dir3/subdir3
1768506102dStholo          C: /home/foo/repos/mod3
1778506102dStholo          . . .
1788506102dStholo          C: Directory dir3
1798506102dStholo          C: /home/foo/repos/.
1808506102dStholo          . . .
1818506102dStholo          C: update
1828506102dStholo
1838506102dStholo     The implementation of the server in 1.10 and earlier writes the
1848506102dStholo     administration files for a given directory at the time of the
1858506102dStholo     `Directory' request.  It also tries to register the directory with
1868506102dStholo     its parent to mark it for recursion.  In the above example, at the
1878506102dStholo     time `dir3/subdir3' is created, the physical directory for `dir3'
1888506102dStholo     will be created on disk, but the administration files will not
1898506102dStholo     have been created.  Therefore, when the server tries to register
1908506102dStholo     `dir3/subdir3' for recursion, the operation will silently fail
1918506102dStholo     because the administration files do not yet exist for `dir3'.
1928506102dStholo
1936407bc5bStholo`Max-dotdot LEVEL \n'
1946407bc5bStholo     Response expected: no.  Tell the server that LEVEL levels of
1956407bc5bStholo     directories above the directory which `Directory' requests are
1966407bc5bStholo     relative to will be needed.  For example, if the client is
1976407bc5bStholo     planning to use a `Directory' request for `../../foo', it must
1986407bc5bStholo     send a `Max-dotdot' request with a LEVEL of at least 2.
1996407bc5bStholo     `Max-dotdot' must be sent before the first `Directory' request.
2006407bc5bStholo
2016407bc5bStholo`Static-directory \n'
2026407bc5bStholo     Response expected: no.  Tell the server that the directory most
2036407bc5bStholo     recently specified with `Directory' should not have additional
2046407bc5bStholo     files checked out unless explicitly requested.  The client sends
2056407bc5bStholo     this if the `Entries.Static' flag is set, which is controlled by
2066407bc5bStholo     the `Set-static-directory' and `Clear-static-directory' responses.
2076407bc5bStholo
2086407bc5bStholo`Sticky TAGSPEC \n'
2096407bc5bStholo     Response expected: no.  Tell the server that the directory most
2106407bc5bStholo     recently specified with `Directory' has a sticky tag or date
2118506102dStholo     TAGSPEC.  The first character of TAGSPEC is `T' for a tag, `D' for
2128506102dStholo     a date, or some other character supplied by a Set-sticky response
2138506102dStholo     from a previous request to the server.  The remainder of TAGSPEC
2148506102dStholo     contains the actual tag or date, again as supplied by Set-sticky.
2156407bc5bStholo
2166407bc5bStholo     The server should remember `Static-directory' and `Sticky'
2176407bc5bStholo     requests for a particular directory; the client need not resend
2186407bc5bStholo     them each time it sends a `Directory' request for a given
2196407bc5bStholo     directory.  However, the server is not obliged to remember them
2206407bc5bStholo     beyond the context of a single command.
2216407bc5bStholo
2226407bc5bStholo`Checkin-prog PROGRAM \n'
2236407bc5bStholo     Response expected: no.  Tell the server that the directory most
2246407bc5bStholo     recently specified with `Directory' has a checkin program PROGRAM.
2256407bc5bStholo     Such a program would have been previously set with the
2266407bc5bStholo     `Set-checkin-prog' response.
2276407bc5bStholo
2286407bc5bStholo`Update-prog PROGRAM \n'
2296407bc5bStholo     Response expected: no.  Tell the server that the directory most
2306407bc5bStholo     recently specified with `Directory' has an update program PROGRAM.
2316407bc5bStholo     Such a program would have been previously set with the
2326407bc5bStholo     `Set-update-prog' response.
2336407bc5bStholo
2346407bc5bStholo`Entry ENTRY-LINE \n'
2356407bc5bStholo     Response expected: no.  Tell the server what version of a file is
2366407bc5bStholo     on the local machine.  The name in ENTRY-LINE is a name relative
2376407bc5bStholo     to the directory most recently specified with `Directory'.  If the
2386407bc5bStholo     user is operating on only some files in a directory, `Entry'
2396407bc5bStholo     requests for only those files need be included.  If an `Entry'
2406407bc5bStholo     request is sent without `Modified', `Is-modified', or `Unchanged',
2416407bc5bStholo     it means the file is lost (does not exist in the working
2426407bc5bStholo     directory).  If both `Entry' and one of `Modified', `Is-modified',
2436407bc5bStholo     or `Unchanged' are sent for the same file, `Entry' must be sent
2446407bc5bStholo     first.  For a given file, one can send `Modified', `Is-modified',
2456407bc5bStholo     or `Unchanged', but not more than one of these three.
2466407bc5bStholo
2476407bc5bStholo`Kopt OPTION \n'
2486407bc5bStholo     This indicates to the server which keyword expansion options to
2496407bc5bStholo     use for the file specified by the next `Modified' or `Is-modified'
2506407bc5bStholo     request (for example `-kb' for a binary file).  This is similar to
2516407bc5bStholo     `Entry', but is used for a file for which there is no entries line.
2526407bc5bStholo     Typically this will be a file being added via an `add' or `import'
2536407bc5bStholo     request.  The client may not send both `Kopt' and `Entry' for the
2546407bc5bStholo     same file.
2556407bc5bStholo
2568506102dStholo`Checkin-time TIME \n'
2578506102dStholo     For the file specified by the next `Modified' request, use TIME as
2588506102dStholo     the time of the checkin.  The TIME is in the format specified by
2598506102dStholo     RFC822 as modified by RFC1123.  The client may specify any
2608506102dStholo     timezone it chooses; servers will want to convert that to their own
2618506102dStholo     timezone as appropriate.  An example of this format is:
2628506102dStholo
2638506102dStholo          26 May 1997 13:01:40 -0400
2648506102dStholo
2658506102dStholo     There is no requirement that the client and server clocks be
2668506102dStholo     synchronized.  The client just sends its recommendation for a
2678506102dStholo     timestamp (based on file timestamps or whatever), and the server
2688506102dStholo     should just believe it (this means that the time might be in the
2698506102dStholo     future, for example).
2708506102dStholo
2718506102dStholo     Note that this is not a general-purpose way to tell the server
2728506102dStholo     about the timestamp of a file; that would be a separate request
2738506102dStholo     (if there are servers which can maintain timestamp and time of
2748506102dStholo     checkin separately).
2758506102dStholo
2768506102dStholo     This request should affect the `import' request, and may optionally
2778506102dStholo     affect the `ci' request or other relevant requests if any.
2788506102dStholo
2796407bc5bStholo`Modified FILENAME \n'
2806407bc5bStholo     Response expected: no.  Additional data: mode, \n, file
2816407bc5bStholo     transmission.  Send the server a copy of one locally modified
2822f9d2fd9Stholo     file.  FILENAME is a file within the most recent directory sent
2832f9d2fd9Stholo     with `Directory'; it must not contain `/'.  If the user is
2842f9d2fd9Stholo     operating on only some files in a directory, only those files need
2852f9d2fd9Stholo     to be included.  This can also be sent without `Entry', if there
2862f9d2fd9Stholo     is no entry for the file.
2876407bc5bStholo
2886407bc5bStholo`Is-modified FILENAME \n'
2896407bc5bStholo     Response expected: no.  Additional data: none.  Like `Modified',
2906407bc5bStholo     but used if the server only needs to know whether the file is
2916407bc5bStholo     modified, not the contents.
2926407bc5bStholo
2936407bc5bStholo     The commands which can take `Is-modified' instead of `Modified'
2946407bc5bStholo     with no known change in behavior are: `admin', `diff' (if and only
2956407bc5bStholo     if two `-r' or `-D' options are specified), `watch-on',
2966407bc5bStholo     `watch-off', `watch-add', `watch-remove', `watchers', `editors',
2976407bc5bStholo     `log', and `annotate'.
2986407bc5bStholo
2996407bc5bStholo     For the `status' command, one can send `Is-modified' but if the
3006407bc5bStholo     client is using imperfect mechanisms such as timestamps to
3016407bc5bStholo     determine whether to consider a file modified, then the behavior
3026407bc5bStholo     will be different.  That is, if one sends `Modified', then the
3036407bc5bStholo     server will actually compare the contents of the file sent and the
3046407bc5bStholo     one it derives from to determine whether the file is genuinely
3056407bc5bStholo     modified.  But if one sends `Is-modified', then the server takes
3066407bc5bStholo     the client's word for it.  A similar situation exists for `tag',
3076407bc5bStholo     if the `-c' option is specified.
3086407bc5bStholo
3096407bc5bStholo     Commands for which `Modified' is necessary are `co', `ci',
3106407bc5bStholo     `update', and `import'.
3116407bc5bStholo
3126407bc5bStholo     Commands which do not need to inform the server about a working
3136407bc5bStholo     directory, and thus should not be sending either `Modified' or
3146407bc5bStholo     `Is-modified': `rdiff', `rtag', `history', `init', and `release'.
3156407bc5bStholo
3166407bc5bStholo     Commands for which further investigation is warranted are:
3176407bc5bStholo     `remove', `add', and `export'.  Pending such investigation, the
3186407bc5bStholo     more conservative course of action is to stick to `Modified'.
3196407bc5bStholo
3206407bc5bStholo`Unchanged FILENAME \n'
3216407bc5bStholo     Response expected: no.  Tell the server that FILENAME has not been
3222f9d2fd9Stholo     modified in the checked out directory.  The FILENAME is a file
3232f9d2fd9Stholo     within the most recent directory sent with `Directory'; it must
3242f9d2fd9Stholo     not contain `/'.
3256407bc5bStholo
3266407bc5bStholo`UseUnchanged \n'
3276407bc5bStholo     Response expected: no.  To specify the version of the protocol
3286407bc5bStholo     described in this document, servers must support this request
329e77048c1Stholo     (although it need not do anything) and clients must issue it.  The
330e77048c1Stholo     `Root' request need not have been previously sent.
3316407bc5bStholo
3326407bc5bStholo`Notify FILENAME \n'
3332f9d2fd9Stholo     Response expected: no.  Tell the server that an `edit' or `unedit'
3346407bc5bStholo     command has taken place.  The server needs to send a `Notified'
3356407bc5bStholo     response, but such response is deferred until the next time that
3362f9d2fd9Stholo     the server is sending responses.  The FILENAME is a file within
3372f9d2fd9Stholo     the most recent directory sent with `Directory'; it must not
3382f9d2fd9Stholo     contain `/'.  Additional data:
3396407bc5bStholo          NOTIFICATION-TYPE \t TIME \t CLIENTHOST \t
3406407bc5bStholo          WORKING-DIR \t WATCHES \n
3416407bc5bStholo     where NOTIFICATION-TYPE is `E' for edit, `U' for unedit, undefined
3426407bc5bStholo     behavior if `C', and all other letters should be silently ignored
3436407bc5bStholo     for future expansion.  TIME is the time at which the edit or
3446407bc5bStholo     unedit took place, in a user-readable format of the client's
3456407bc5bStholo     choice (the server should treat the time as an opaque string
3466407bc5bStholo     rather than interpreting it).  CLIENTHOST is the name of the host
3476407bc5bStholo     on which the edit or unedit took place, and WORKING-DIR is the
3486407bc5bStholo     pathname of the working directory where the edit or unedit took
3492f9d2fd9Stholo     place.  WATCHES are the temporary watches, zero or more of the
3502f9d2fd9Stholo     following characters in the following order: `E' for edit, `U' for
3512f9d2fd9Stholo     unedit, `C' for commit, and all other letters should be silently
3522f9d2fd9Stholo     ignored for future expansion.  If NOTIFICATION-TYPE is `E' the
3532f9d2fd9Stholo     temporary watches are set; if it is `U' they are cleared.  If
3542f9d2fd9Stholo     WATCHES is followed by \t then the \t and the rest of the line
3552f9d2fd9Stholo     should be ignored, for future expansion.
3562f9d2fd9Stholo
3572f9d2fd9Stholo     The TIME, CLIENTHOST, and WORKING-DIR fields may not contain the
3582f9d2fd9Stholo     characters `+', `,', `>', `;', or `='.
3596407bc5bStholo
3606407bc5bStholo     Note that a client may be capable of performing an `edit' or
3616407bc5bStholo     `unedit' operation without connecting to the server at that time,
3626407bc5bStholo     and instead connecting to the server when it is convenient (for
3636407bc5bStholo     example, when a laptop is on the net again) to send the `Notify'
3646407bc5bStholo     requests.  Even if a client is capable of deferring notifications,
3656407bc5bStholo     it should attempt to send them immediately (one can send `Notify'
3666407bc5bStholo     requests together with a `noop' request, for example), unless
3676407bc5bStholo     perhaps if it can know that a connection would be impossible.
3686407bc5bStholo
3696407bc5bStholo`Questionable FILENAME \n'
3706407bc5bStholo     Response expected: no.  Additional data: no.  Tell the server to
3716407bc5bStholo     check whether FILENAME should be ignored, and if not, next time the
3726407bc5bStholo     server sends responses, send (in a `M' response) `?' followed by
3736407bc5bStholo     the directory and filename.  FILENAME must not contain `/'; it
3746407bc5bStholo     needs to be a file in the directory named by the most recent
3756407bc5bStholo     `Directory' request.
3766407bc5bStholo
3776407bc5bStholo`Case \n'
3786407bc5bStholo     Response expected: no.  Tell the server that filenames should be
3796407bc5bStholo     matched in a case-insensitive fashion.  Note that this is not the
3806407bc5bStholo     primary mechanism for achieving case-insensitivity; for the most
3816407bc5bStholo     part the client keeps track of the case which the server wants to
3826407bc5bStholo     use and takes care to always use that case regardless of what the
3836407bc5bStholo     user specifies.  For example the filenames given in `Entry' and
3846407bc5bStholo     `Modified' requests for the same file must match in case
3856407bc5bStholo     regardless of whether the `Case' request is sent.  The latter
3866407bc5bStholo     mechanism is more general (it could also be used for 8.3
3876407bc5bStholo     filenames, VMS filenames with more than one `.', and any other
3886407bc5bStholo     situation in which there is a predictable mapping between
3896407bc5bStholo     filenames in the working directory and filenames in the protocol),
3906407bc5bStholo     but there are some situations it cannot handle (ignore patterns, or
3916407bc5bStholo     situations where the user specifies a filename and the client does
3926407bc5bStholo     not know about that file).
3936407bc5bStholo
3946407bc5bStholo`Argument TEXT \n'
3956407bc5bStholo     Response expected: no.  Save argument for use in a subsequent
3966407bc5bStholo     command.  Arguments accumulate until an argument-using command is
3976407bc5bStholo     given, at which point they are forgotten.
3986407bc5bStholo
3996407bc5bStholo`Argumentx TEXT \n'
4006407bc5bStholo     Response expected: no.  Append \n followed by text to the current
4016407bc5bStholo     argument being saved.
4026407bc5bStholo
4036407bc5bStholo`Global_option OPTION \n'
4046407bc5bStholo     Response expected: no.  Transmit one of the global options `-q',
4056407bc5bStholo     `-Q', `-l', `-t', `-r', or `-n'.  OPTION must be one of those
4066407bc5bStholo     strings, no variations (such as combining of options) are allowed.
4076407bc5bStholo     For graceful handling of `valid-requests', it is probably better
4086407bc5bStholo     to make new global options separate requests, rather than trying
409e77048c1Stholo     to add them to this request.  The `Root' request need not have
410e77048c1Stholo     been previously sent.
4116407bc5bStholo
4126407bc5bStholo`Gzip-stream LEVEL \n'
4136407bc5bStholo     Response expected: no.  Use zlib (RFC 1950/1951) compression to
4146407bc5bStholo     compress all further communication between the client and the
4156407bc5bStholo     server.  After this request is sent, all further communication
4166407bc5bStholo     must be compressed.  All further data received from the server
4176407bc5bStholo     will also be compressed.  The LEVEL argument suggests to the
4186407bc5bStholo     server the level of compression that it should apply; it should be
4196407bc5bStholo     an integer between 1 and 9, inclusive, where a higher number
4206407bc5bStholo     indicates more compression.
4216407bc5bStholo
4226407bc5bStholo`Kerberos-encrypt \n'
4236407bc5bStholo     Response expected: no.  Use Kerberos encryption to encrypt all
4246407bc5bStholo     further communication between the client and the server.  This
4256407bc5bStholo     will only work if the connection was made over Kerberos in the
4266407bc5bStholo     first place.  If both the `Gzip-stream' and the `Kerberos-encrypt'
4276407bc5bStholo     requests are used, the `Kerberos-encrypt' request should be used
4286407bc5bStholo     first.  This will make the client and server encrypt the
4296407bc5bStholo     compressed data, as opposed to compressing the encrypted data.
4306407bc5bStholo     Encrypted data is generally incompressible.
4316407bc5bStholo
4326407bc5bStholo     Note that this request does not fully prevent an attacker from
4336407bc5bStholo     hijacking the connection, in the sense that it does not prevent
4346407bc5bStholo     hijacking the connection between the initial authentication and the
4356407bc5bStholo     `Kerberos-encrypt' request.
4366407bc5bStholo
4376407bc5bStholo`Gssapi-encrypt \n'
4386407bc5bStholo     Response expected: no.  Use GSSAPI encryption to encrypt all
4396407bc5bStholo     further communication between the client and the server.  This
4406407bc5bStholo     will only work if the connection was made over GSSAPI in the first
4416407bc5bStholo     place.  See `Kerberos-encrypt', above, for the relation between
4426407bc5bStholo     `Gssapi-encrypt' and `Gzip-stream'.
4436407bc5bStholo
4446407bc5bStholo     Note that this request does not fully prevent an attacker from
4456407bc5bStholo     hijacking the connection, in the sense that it does not prevent
4466407bc5bStholo     hijacking the connection between the initial authentication and the
4476407bc5bStholo     `Gssapi-encrypt' request.
4486407bc5bStholo
4496407bc5bStholo`Gssapi-authenticate \n'
4506407bc5bStholo     Response expected: no.  Use GSSAPI authentication to authenticate
4516407bc5bStholo     all further communication between the client and the server.  This
4526407bc5bStholo     will only work if the connection was made over GSSAPI in the first
4536407bc5bStholo     place.  Encrypted data is automatically authenticated, so using
4546407bc5bStholo     both `Gssapi-authenticate' and `Gssapi-encrypt' has no effect
4556407bc5bStholo     beyond that of `Gssapi-encrypt'.  Unlike encrypted data, it is
4566407bc5bStholo     reasonable to compress authenticated data.
4576407bc5bStholo
4586407bc5bStholo     Note that this request does not fully prevent an attacker from
4596407bc5bStholo     hijacking the connection, in the sense that it does not prevent
4606407bc5bStholo     hijacking the connection between the initial authentication and the
4616407bc5bStholo     `Gssapi-authenticate' request.
4626407bc5bStholo
4636407bc5bStholo`Set VARIABLE=VALUE \n'
4646407bc5bStholo     Response expected: no.  Set a user variable VARIABLE to VALUE.
465e77048c1Stholo     The `Root' request need not have been previously sent.
4666407bc5bStholo
4676407bc5bStholo`expand-modules \n'
4686407bc5bStholo     Response expected: yes.  Expand the modules which are specified in
4696407bc5bStholo     the arguments.  Returns the data in `Module-expansion' responses.
4706407bc5bStholo     Note that the server can assume that this is checkout or export,
4716407bc5bStholo     not rtag or rdiff; the latter do not access the working directory
4726407bc5bStholo     and thus have no need to expand modules on the client side.
4736407bc5bStholo
4746407bc5bStholo     Expand may not be the best word for what this request does.  It
4756407bc5bStholo     does not necessarily tell you all the files contained in a module,
4766407bc5bStholo     for example.  Basically it is a way of telling you which working
4776407bc5bStholo     directories the server needs to know about in order to handle a
4786407bc5bStholo     checkout of the specified modules.
4796407bc5bStholo
4806407bc5bStholo     For example, suppose that the server has a module defined by
4816407bc5bStholo
4826407bc5bStholo          aliasmodule -a 1dir
4836407bc5bStholo
4846407bc5bStholo     That is, one can check out `aliasmodule' and it will take `1dir'
4856407bc5bStholo     in the repository and check it out to `1dir' in the working
4866407bc5bStholo     directory.  Now suppose the client already has this module checked
4876407bc5bStholo     out and is planning on using the `co' request to update it.
4886407bc5bStholo     Without using `expand-modules', the client would have two bad
4892f9d2fd9Stholo     choices: it could either send information about _all_ working
4906407bc5bStholo     directories under the current directory, which could be
4916407bc5bStholo     unnecessarily slow, or it could be ignorant of the fact that
4926407bc5bStholo     `aliasmodule' stands for `1dir', and neglect to send information
4936407bc5bStholo     for `1dir', which would lead to incorrect operation.
4946407bc5bStholo
4956407bc5bStholo     With `expand-modules', the client would first ask for the module to
4966407bc5bStholo     be expanded:
4976407bc5bStholo
4986407bc5bStholo          C: Root /home/kingdon/zwork/cvsroot
4996407bc5bStholo          . . .
5006407bc5bStholo          C: Argument aliasmodule
5016407bc5bStholo          C: Directory .
5026407bc5bStholo          C: /home/kingdon/zwork/cvsroot
5036407bc5bStholo          C: expand-modules
5046407bc5bStholo          S: Module-expansion 1dir
5056407bc5bStholo          S: ok
5066407bc5bStholo
5076407bc5bStholo     and then it knows to check the `1dir' directory and send requests
5086407bc5bStholo     such as `Entry' and `Modified' for the files in that directory.
5096407bc5bStholo
5106407bc5bStholo`ci \n'
5116407bc5bStholo`diff \n'
5126407bc5bStholo`tag \n'
5136407bc5bStholo`status \n'
5146407bc5bStholo`admin \n'
5156407bc5bStholo`history \n'
5166407bc5bStholo`watchers \n'
5176407bc5bStholo`editors \n'
5186407bc5bStholo`annotate \n'
5196407bc5bStholo     Response expected: yes.  Actually do a cvs command.  This uses any
5206407bc5bStholo     previous `Argument', `Directory', `Entry', or `Modified' requests,
5216407bc5bStholo     if they have been sent.  The last `Directory' sent specifies the
5226407bc5bStholo     working directory at the time of the operation.  No provision is
5236407bc5bStholo     made for any input from the user.  This means that `ci' must use a
5246407bc5bStholo     `-m' argument if it wants to specify a log message.
5256407bc5bStholo
526e77048c1Stholo`log \n'
527e77048c1Stholo     Response expected: yes.  Show information for past revisions.
528e77048c1Stholo     This uses any previous `Directory', `Entry', or `Modified'
529e77048c1Stholo     requests, if they have been sent.  The last `Directory' sent
530e77048c1Stholo     specifies the working directory at the time of the operation.
531e77048c1Stholo     Also uses previous `Argument''s of which the canonical forms are
532e77048c1Stholo     the following (CVS 1.10 and older clients sent what the user
533e77048c1Stholo     specified, but clients are encouraged to use the canonical forms
534e77048c1Stholo     and other forms are deprecated):
535e77048c1Stholo
536e77048c1Stholo    `-b, -h, -l, -N, -R, -t'
537e77048c1Stholo          These options go by themselves, one option per `Argument'
538e77048c1Stholo          request.
539e77048c1Stholo
540e77048c1Stholo    `-d DATE1<DATE2'
541e77048c1Stholo          Select revisions between DATE1 and DATE2.  Either date may be
542e77048c1Stholo          omitted in which case there is no date limit at that end of
543e77048c1Stholo          the range (clients may specify dates such as 1 Jan 1970 or 1
544e77048c1Stholo          Jan 2038 for similar purposes but this is problematic as it
545e77048c1Stholo          makes assumptions about what dates the server supports).
546e77048c1Stholo          Dates are in RFC822/1123 format.  The `-d' is one `Argument'
547e77048c1Stholo          request and the date range is a second one.
548e77048c1Stholo
549e77048c1Stholo    `-d DATE1<=DATE2'
550e77048c1Stholo          Likewise but compare dates for equality.
551e77048c1Stholo
552e77048c1Stholo    `-d SINGLEDATE'
553e77048c1Stholo          Select the single, latest revision dated SINGLEDATE or
554e77048c1Stholo          earlier.
555e77048c1Stholo
556e77048c1Stholo          To include several date ranges and/or singledates, repeat the
557e77048c1Stholo          `-d' option as many times as necessary.
558e77048c1Stholo
559e77048c1Stholo    `-rREV1:REV2'
560e77048c1Stholo    `-rBRANCH'
561e77048c1Stholo    `-rBRANCH.'
562e77048c1Stholo    `-r'
563e77048c1Stholo          Specify revisions (note that REV1 or REV2 can be omitted, or
564e77048c1Stholo          can refer to branches).  Send both the `-r' and the revision
565e77048c1Stholo          information in a single `Argument' request.  To include
566e77048c1Stholo          several revision selections, repeat the `-r' option.
567e77048c1Stholo
568e77048c1Stholo    `-s STATE'
569e77048c1Stholo    `-w'
570e77048c1Stholo    `-wLOGIN'
571e77048c1Stholo          Select on states or users.  To include more than one state or
572e77048c1Stholo          user, repeat the option.  Send the `-s' option as a separate
573e77048c1Stholo          argument from the state being selected.  Send the `-w' option
574e77048c1Stholo          as part of the same argument as the user being selected.
575e77048c1Stholo
5766407bc5bStholo`co \n'
5776407bc5bStholo     Response expected: yes.  Get files from the repository.  This uses
5786407bc5bStholo     any previous `Argument', `Directory', `Entry', or `Modified'
5796407bc5bStholo     requests, if they have been sent.  Arguments to this command are
5806407bc5bStholo     module names; the client cannot know what directories they
5816407bc5bStholo     correspond to except by (1) just sending the `co' request, and then
5826407bc5bStholo     seeing what directory names the server sends back in its
5836407bc5bStholo     responses, and (2) the `expand-modules' request.
5846407bc5bStholo
5856407bc5bStholo`export \n'
5866407bc5bStholo     Response expected: yes.  Get files from the repository.  This uses
5876407bc5bStholo     any previous `Argument', `Directory', `Entry', or `Modified'
5886407bc5bStholo     requests, if they have been sent.  Arguments to this command are
5896407bc5bStholo     module names, as described for the `co' request.  The intention
5906407bc5bStholo     behind this command is that a client can get sources from a server
5916407bc5bStholo     without storing CVS information about those sources.  That is, a
5926407bc5bStholo     client probably should not count on being able to take the entries
5936407bc5bStholo     line returned in the `Created' response from an `export' request
5946407bc5bStholo     and send it in a future `Entry' request.  Note that the entries
5956407bc5bStholo     line in the `Created' response must indicate whether the file is
5966407bc5bStholo     binary or text, so the client can create it correctly.
5976407bc5bStholo
598*43c1707eStholo`rannotate \n'
5996407bc5bStholo`rdiff \n'
600*43c1707eStholo`rlog \n'
6016407bc5bStholo`rtag \n'
6026407bc5bStholo     Response expected: yes.  Actually do a cvs command.  This uses any
6036407bc5bStholo     previous `Argument' requests, if they have been sent.  The client
6046407bc5bStholo     should not send `Directory', `Entry', or `Modified' requests for
605*43c1707eStholo     these commands; they are not used.  Arguments to these commands
606*43c1707eStholo     are module names, as described for `co'.
6076407bc5bStholo
6086407bc5bStholo`init ROOT-NAME \n'
6096407bc5bStholo     Response expected: yes.  If it doesn't already exist, create a CVS
6106407bc5bStholo     repository ROOT-NAME.  Note that ROOT-NAME is a local directory
6112f9d2fd9Stholo     and _not_ a fully qualified `CVSROOT' variable.  The `Root'
6126407bc5bStholo     request need not have been previously sent.
6136407bc5bStholo
6146407bc5bStholo`update \n'
6156407bc5bStholo     Response expected: yes.  Actually do a `cvs update' command.  This
6166407bc5bStholo     uses any previous `Argument', `Directory', `Entry', or `Modified'
6176407bc5bStholo     requests, if they have been sent.  The last `Directory' sent
6186407bc5bStholo     specifies the working directory at the time of the operation.  The
6196407bc5bStholo     `-I' option is not used-files which the client can decide whether
6206407bc5bStholo     to ignore are not mentioned and the client sends the
6216407bc5bStholo     `Questionable' request for others.
6226407bc5bStholo
6236407bc5bStholo`import \n'
6246407bc5bStholo     Response expected: yes.  Actually do a `cvs import' command.  This
6256407bc5bStholo     uses any previous `Argument', `Directory', `Entry', or `Modified'
6266407bc5bStholo     requests, if they have been sent.  The last `Directory' sent
6272f9d2fd9Stholo     specifies the working directory at the time of the operation -
6282f9d2fd9Stholo     unlike most commands, the repository field of each `Directory'
6292f9d2fd9Stholo     request is ignored (it merely must point somewhere within the
6302f9d2fd9Stholo     root).  The files to be imported are sent in `Modified' requests
6312f9d2fd9Stholo     (files which the client knows should be ignored are not sent; the
6322f9d2fd9Stholo     server must still process the CVSROOT/cvsignore file unless -I ! is
6332f9d2fd9Stholo     sent).  A log message must have been specified with a `-m'
6342f9d2fd9Stholo     argument.
6356407bc5bStholo
6366407bc5bStholo`add \n'
6376407bc5bStholo     Response expected: yes.  Add a file or directory.  This uses any
6386407bc5bStholo     previous `Argument', `Directory', `Entry', or `Modified' requests,
6396407bc5bStholo     if they have been sent.  The last `Directory' sent specifies the
6406407bc5bStholo     working directory at the time of the operation.
6416407bc5bStholo
6426407bc5bStholo     To add a directory, send the directory to be added using
6436407bc5bStholo     `Directory' and `Argument' requests.  For example:
6446407bc5bStholo
6456407bc5bStholo          C: Root /u/cvsroot
6466407bc5bStholo          . . .
6476407bc5bStholo          C: Argument nsdir
6486407bc5bStholo          C: Directory nsdir
6496407bc5bStholo          C: /u/cvsroot/1dir/nsdir
6506407bc5bStholo          C: Directory .
6516407bc5bStholo          C: /u/cvsroot/1dir
6526407bc5bStholo          C: add
6536407bc5bStholo          S: M Directory /u/cvsroot/1dir/nsdir added to the repository
6546407bc5bStholo          S: ok
6556407bc5bStholo
6566407bc5bStholo     You will notice that the server does not signal to the client in
6576407bc5bStholo     any particular way that the directory has been successfully added.
6586407bc5bStholo     The client is supposed to just assume that the directory has been
6596407bc5bStholo     added and update its records accordingly.  Note also that adding a
6606407bc5bStholo     directory is immediate; it does not wait until a `ci' request as
6616407bc5bStholo     files do.
6626407bc5bStholo
6636407bc5bStholo     To add a file, send the file to be added using a `Modified'
6646407bc5bStholo     request.  For example:
6656407bc5bStholo
6666407bc5bStholo          C: Argument nfile
6676407bc5bStholo          C: Directory .
6686407bc5bStholo          C: /u/cvsroot/1dir
6696407bc5bStholo          C: Modified nfile
6706407bc5bStholo          C: u=rw,g=r,o=r
6716407bc5bStholo          C: 6
6726407bc5bStholo          C: hello
6736407bc5bStholo          C: add
6746407bc5bStholo          S: E cvs server: scheduling file `nfile' for addition
6756407bc5bStholo          S: Mode u=rw,g=r,o=r
6766407bc5bStholo          S: Checked-in ./
6776407bc5bStholo          S: /u/cvsroot/1dir/nfile
6786407bc5bStholo          S: /nfile/0///
6796407bc5bStholo          S: E cvs server: use 'cvs commit' to add this file permanently
6806407bc5bStholo          S: ok
6816407bc5bStholo
6826407bc5bStholo     Note that the file has not been added to the repository; the only
6836407bc5bStholo     effect of a successful `add' request, for a file, is to supply the
6846407bc5bStholo     client with a new entries line containing `0' to indicate an added
6856407bc5bStholo     file.  In fact, the client probably could perform this operation
6866407bc5bStholo     without contacting the server, although using `add' does cause the
6876407bc5bStholo     server to perform a few more checks.
6886407bc5bStholo
6896407bc5bStholo     The client sends a subsequent `ci' to actually add the file to the
6906407bc5bStholo     repository.
6916407bc5bStholo
6926407bc5bStholo     Another quirk of the `add' request is that with CVS 1.9 and older,
6936407bc5bStholo     a pathname specified in an `Argument' request cannot contain `/'.
6946407bc5bStholo     There is no good reason for this restriction, and in fact more
6956407bc5bStholo     recent CVS servers don't have it.  But the way to interoperate
6966407bc5bStholo     with the older servers is to ensure that all `Directory' requests
6976407bc5bStholo     for `add' (except those used to add directories, as described
6986407bc5bStholo     above), use `.' for LOCAL-DIRECTORY.  Specifying another string for
6996407bc5bStholo     LOCAL-DIRECTORY may not get an error, but it will get you strange
7006407bc5bStholo     `Checked-in' responses from the buggy servers.
7016407bc5bStholo
702d794bb93Stholo`remove \n'
703d794bb93Stholo     Response expected: yes.  Remove a file.  This uses any previous
704d794bb93Stholo     `Argument', `Directory', `Entry', or `Modified' requests, if they
705d794bb93Stholo     have been sent.  The last `Directory' sent specifies the working
706d794bb93Stholo     directory at the time of the operation.
707d794bb93Stholo
708d794bb93Stholo     Note that this request does not actually do anything to the
709d794bb93Stholo     repository; the only effect of a successful `remove' request is to
710d794bb93Stholo     supply the client with a new entries line containing `-' to
711d794bb93Stholo     indicate a removed file.  In fact, the client probably could
712d794bb93Stholo     perform this operation without contacting the server, although
713d794bb93Stholo     using `remove' may cause the server to perform a few more checks.
714d794bb93Stholo
715d794bb93Stholo     The client sends a subsequent `ci' request to actually record the
716d794bb93Stholo     removal in the repository.
717d794bb93Stholo
7186407bc5bStholo`watch-on \n'
7196407bc5bStholo`watch-off \n'
7206407bc5bStholo`watch-add \n'
7216407bc5bStholo`watch-remove \n'
7226407bc5bStholo     Response expected: yes.  Actually do the `cvs watch on', `cvs
7236407bc5bStholo     watch off', `cvs watch add', and `cvs watch remove' commands,
7246407bc5bStholo     respectively.  This uses any previous `Argument', `Directory',
7256407bc5bStholo     `Entry', or `Modified' requests, if they have been sent.  The last
7266407bc5bStholo     `Directory' sent specifies the working directory at the time of
7276407bc5bStholo     the operation.
7286407bc5bStholo
7296407bc5bStholo`release \n'
7306407bc5bStholo     Response expected: yes.  Note that a `cvs release' command has
7316407bc5bStholo     taken place and update the history file accordingly.
7326407bc5bStholo
7336407bc5bStholo`noop \n'
7346407bc5bStholo     Response expected: yes.  This request is a null command in the
7356407bc5bStholo     sense that it doesn't do anything, but merely (as with any other
7366407bc5bStholo     requests expecting a response) sends back any responses pertaining
737e77048c1Stholo     to pending errors, pending `Notified' responses, etc.  The `Root'
738e77048c1Stholo     request need not have been previously sent.
7396407bc5bStholo
7406407bc5bStholo`update-patches \n'
7416407bc5bStholo     Response expected: yes.  This request does not actually do
7426407bc5bStholo     anything.  It is used as a signal that the server is able to
7436407bc5bStholo     generate patches when given an `update' request.  The client must
7446407bc5bStholo     issue the `-u' argument to `update' in order to receive patches.
7456407bc5bStholo
7466407bc5bStholo`gzip-file-contents LEVEL \n'
7476407bc5bStholo     Response expected: no.  Note that this request does not follow the
7486407bc5bStholo     response convention stated above.  `Gzip-stream' is suggested
7496407bc5bStholo     instead of `gzip-file-contents' as it gives better compression; the
7506407bc5bStholo     only reason to implement the latter is to provide compression with
7516407bc5bStholo     CVS 1.8 and earlier.  The `gzip-file-contents' request asks the
7526407bc5bStholo     server to compress files it sends to the client using `gzip'
7536407bc5bStholo     (RFC1952/1951) compression, using the specified level of
7546407bc5bStholo     compression.  If this request is not made, the server must not
7556407bc5bStholo     compress files.
7566407bc5bStholo
7576407bc5bStholo     This is only a hint to the server.  It may still decide (for
7586407bc5bStholo     example, in the case of very small files, or files that already
7596407bc5bStholo     appear to be compressed) not to do the compression.  Compression
7606407bc5bStholo     is indicated by a `z' preceding the file length.
7616407bc5bStholo
7626407bc5bStholo     Availability of this request in the server indicates to the client
7636407bc5bStholo     that it may compress files sent to the server, regardless of
7646407bc5bStholo     whether the client actually uses this request.
7656407bc5bStholo
7666407bc5bStholo`wrapper-sendme-rcsOptions \n'
7676407bc5bStholo     Response expected: yes.  Request that the server transmit mappings
7686407bc5bStholo     from filenames to keyword expansion modes in `Wrapper-rcsOption'
7696407bc5bStholo     responses.
7706407bc5bStholo
771e77048c1Stholo`version \n'
772e77048c1Stholo     Response expected: yes.  Request that the server transmit its
773e77048c1Stholo     version message.  The `Root' request need not have been previously
774e77048c1Stholo     sent.
775e77048c1Stholo
7766407bc5bStholo`OTHER-REQUEST TEXT \n'
7776407bc5bStholo     Response expected: yes.  Any unrecognized request expects a
7786407bc5bStholo     response, and does not contain any additional data.  The response
7796407bc5bStholo     will normally be something like `error  unrecognized request', but
7808506102dStholo     it could be a different error if a previous request which doesn't
7816407bc5bStholo     expect a response produced an error.
7826407bc5bStholo
7836407bc5bStholo   When the client is done, it drops the connection.
7846407bc5bStholo
7856407bc5bStholo
786f79d7d1bStholoFile: cvsclient.info,  Node: Response intro,  Next: Response pathnames,  Prev: Requests,  Up: Protocol
787f79d7d1bStholo
788f79d7d1bStholoIntroduction to Responses
789f79d7d1bStholo=========================
790f79d7d1bStholo
791f79d7d1bStholo   After a command which expects a response, the server sends however
792f79d7d1bStholomany of the following responses are appropriate.  The server should not
793f79d7d1bStholosend data at other times (the current implementation may violate this
794f79d7d1bStholoprinciple in a few minor places, where the server is printing an error
795f79d7d1bStholomessage and exiting--this should be investigated further).
796f79d7d1bStholo
797f79d7d1bStholo   Any set of responses always ends with `error' or `ok'.  This
798f79d7d1bStholoindicates that the response is over.
799f79d7d1bStholo
800f79d7d1bStholo   The responses `Checked-in', `New-entry', `Updated', `Created',
801f79d7d1bStholo`Update-existing', `Merged', and `Patched' are refered to as "file
802f79d7d1bStholoupdating" responses, because they change the status of a file in the
803f79d7d1bStholoworking directory in some way.  The responses `Mode', `Mod-time', and
804f79d7d1bStholo`Checksum' are referred to as "file update modifying" responses because
805f79d7d1bStholothey modify the next file updating response.  In no case shall a file
806f79d7d1bStholoupdate modifying response apply to a file updating response other than
807f79d7d1bStholothe next one.  Nor can the same file update modifying response occur
808f79d7d1bStholotwice for a given file updating response (if servers diagnose this
809f79d7d1bStholoproblem, it may aid in detecting the case where clients send an update
810f79d7d1bStholomodifying response without following it by a file updating response).
811f79d7d1bStholo
812f79d7d1bStholo
813f79d7d1bStholoFile: cvsclient.info,  Node: Response pathnames,  Next: Responses,  Prev: Response intro,  Up: Protocol
814f79d7d1bStholo
815f79d7d1bStholoThe "pathname" in responses
816f79d7d1bStholo===========================
817f79d7d1bStholo
818f79d7d1bStholo   Many of the responses contain something called PATHNAME.  The name
819f79d7d1bStholois somewhat misleading; it actually indicates a pair of pathnames.
820f79d7d1bStholoFirst, a local directory name relative to the directory in which the
821f79d7d1bStholocommand was given (i.e. the last `Directory' before the command).  Then
822f79d7d1bStholoa linefeed and a repository name.  Then a slash and the filename
823f79d7d1bStholo(without a `,v' ending).  For example, for a file `i386.mh' which is in
824f79d7d1bStholothe local directory `gas.clean/config' and for which the repository is
825f79d7d1bStholo`/rel/cvsfiles/devo/gas/config':
826f79d7d1bStholo
827f79d7d1bStholo     gas.clean/config/
828f79d7d1bStholo     /rel/cvsfiles/devo/gas/config/i386.mh
829f79d7d1bStholo
830f79d7d1bStholo   If the server wants to tell the client to create a directory, then it
831f79d7d1bStholomerely uses the directory in any response, as described above, and the
832f79d7d1bStholoclient should create the directory if it does not exist.  Note that this
833f79d7d1bStholoshould only be done one directory at a time, in order to permit the
834f79d7d1bStholoclient to correctly store the repository for each directory.  Servers
835f79d7d1bStholocan use requests such as `Clear-sticky', `Clear-static-directory', or
836f79d7d1bStholoany other requests, to create directories.
837f79d7d1bStholo
838f79d7d1bStholo   Some server implementations may poorly distinguish between a
839f79d7d1bStholodirectory which should not exist and a directory which contains no
840f79d7d1bStholofiles; in order to refrain from creating empty directories a client
841f79d7d1bStholoshould both send the `-P' option to `update' or `co', and should also
842f79d7d1bStholodetect the case in which the server asks to create a directory but not
843f79d7d1bStholoany files within it (in that case the client should remove the
844f79d7d1bStholodirectory or refrain from creating it in the first place).  Note that
845f79d7d1bStholoservers could clean this up greatly by only telling the client to
846f79d7d1bStholocreate directories if the directory in question should exist, but until
847f79d7d1bStholoservers do this, clients will need to offer the `-P' behavior described
848f79d7d1bStholoabove.
849f79d7d1bStholo
850