📄 protocol
字号:
response: ( rev:number )
change-rev-prop
params: ( rev:number name:string ? value:string )
response: ( )
If value is not specified, the rev-prop is removed.
(Originally the value was required; for minimum impact, it was
changed to be optional without creating an optional tuple for
that one parameter as we normally do.)
rev-proplist
params: ( rev:number )
response: ( props:proplist )
rev-prop
params: ( rev:number name:string )
response: ( [ value:string ] )
commit
params: ( logmsg:string )
response: ( )
Upon receiving response, client switches to editor command set.
Upon successful completion of edit, server sends auth-request.
After auth exchange completes, server sends commit-info.
commit-info: ( new-rev:number date:string author:string )
get-file
params: ( path:string [ rev:number ] want-props:bool want-contents:bool )
response: ( [ checksum:string ] rev:number props:proplist )
If want-contents is specified, then after sending response, server
sends file contents as a series of strings, terminated by the empty
string, followed by a second empty command response to indicate
whether an error occurred during the sending of the file.
get-dir
params: ( path:string [ rev:number ] want-props:bool want-contents:bool )
response: ( rev:number props:proplist ( entry:dirent ... ) )]
dirent: ( name:string kind:node-kind size:number has-props:bool
created-rev:number [ created-date:string ]
[ last-author:string ] )
update
params: ( [ rev:number ] target:string recurse:bool )
Client switches to report command set.
Upon finish-report, server sends auth-request.
After auth exchange completes, server switches to editor command set.
After edit completes, server sends response.
response: ( )
switch
params: ( [ rev:number ] target:string recurse:bool url:string )
Client switches to report command set.
Upon finish-report, server sends auth-request.
After auth exchange completes, server switches to editor command set.
After edit completes, server sends response.
response: ( )
status
params: ( target:string recurse:bool )
Client switches to report command set.
Upon finish-report, server sends auth-request.
After auth exchange completes, server switches to editor command set.
After edit completes, server sends response.
response: ( )
diff
params: ( [ rev:number ] target:string recurse:bool url:string )
Client switches to report command set.
Upon finish-report, server sends auth-request.
After auth exchange completes, server switches to editor command set.
After edit completes, server sends response.
response: ( )
log
params: ( ( target-path:string ... ) [ start-rev:number ]
[ end-rev:number ] changed-paths:bool strict-node:bool )
Before sending response, server sends log entries, ending with "done".
log-entry: ( ( change:changed-path-entry ... ) rev:number
[ author:string ] [ date:string ] [ message:string ] )
| done
changed-path-entry: ( path:string A|D|R|M [ copy-path:string ]
[ copy-rev:number ] )
response: ( )
get-locations
params: ( path:string peg-rev:number ( rev:number ... ) )
Before sending response, server sends location entries, ending with "done".
location-entry: ( rev:number abs-path:number ) | done
response: ( )
get-file-revs
params: ( path:string [ start-rev:number ] [ end-rev:number ] )
Before sending response, server sends filr-rev entries, ending with "done".
file-rev: ( path:string rev:number rev-props:proplist
file-props:propdelta )
| done
After each file-rev, the file delta is sent as one or more strings,
terminated by the empty string. If there is no delta, server just sends
the terminator.
response: ( )
3.1.2. Editor Command Set
If edit pipelining is negotiated (see section 2.1), than an edit
operation produces only one response, at close-edit or abort-edit
time. However, the consumer may write an error response at any time
during the edit in order to terminate the edit operation early; the
driver must notice that input is waiting on the connection, read the
error, and send an abort-edit operation. After an error is returned,
the consumer must read and discard editing operations until the
abort-edit. In order to prevent TCP deadlock, the consumer must use
non-blocking I/O to send an early error response; if writing blocks,
the consumer must read and discard edit operations until writing
unblocks or it reads an abort-edit.
If edit pipelining is not negotiated, then the target-rev, open-root,
delete-entry, add-dir, open-dir, close-dir, and close-file operations
produce empty responses. Errors produced other operations are
reported by the enclosing close-dir or close-file operation.
target-rev
params: ( rev:number )
open-root
params: ( [ rev:number ] root-token:string )
delete-entry
params: ( path:string rev:number dir-token:string )
add-dir
params: ( path:string parent-token:string child-token:string
[ copy-path:string copy-rev:number ] )
open-dir
params: ( path:string parent-token:string child-token:string rev:number )
change-dir-prop
params: ( dir-token:string name:string [ value:string ] )
close-dir
params: ( dir-token:string )
add-file
params: ( path:string dir-token:string file-token:string
[ copy-path:string copy-rev:number ] )
open-file
params: ( path:string dir-token:string file-token:string rev:number )
apply-textdelta
params: ( file-token:string [ base-checksum:string ] )
If edit-pipelining is not negotiated, after sending command,
client sends svndiff data as strings, terminated by an empty string.
textdelta-chunk (only used if edit-pipeline is negotiated)
params: ( file-token:string chunk:string )
textdelta-end (only used if edit-pipeline is negotiated)
params: ( file-token:string )
change-file-prop
params: ( file-token:string name:string [ value:string ] )
close-file
params: ( file-token:string [ text-checksum:string ] )
close-edit
params: ( )
response: ( )
abort-edit
params: ( )
response: ( )
3.1.3. Report Command Set
To reduce round-trip delays, report commands do not return responses.
Any errors resulting from a report call will be returned to the client
by the command which invoked the report (following an abort-edit
call). Errors resulting from an abort-report call are ignored.
set-path:
params: ( path:string rev:number start-empty:bool )
delete-path:
params: ( path:string )
link-path:
params: ( path:string url:string rev:number start-empty:bool )
finish-report:
params: ( )
abort-report
params: ( )
4. Extensibility
This protocol may be extended in three ways, in decreasing order of
desirability:
* Items may be added to any tuple. An old implementation will
ignore the extra items.
* Named extensions may be expressed at connection initiation time
by the clent or server.
* The protocol version may be bumped. Clients and servers can then
choose to any range of protocol versions.
It is quite possible that the protocol version will never change.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -