On Sat, Mar 30, 2013 at 4:37 PM, Bo Chen <bo.irvine.chen_at_gmail.com> wrote:
> In subversion/libsvn_ra_svn/editop.c
> * Both the client and server in the svn protocol need to drive and
> * consume editors. For a commit, the client drives and the server
> * consumes; for an update/switch/status/diff, the server drives and
> * the client consumes. This file provides a generic framework for
> * marshalling and unmarshalling editor operations over an svn
> * connection; both ends are useful for both server and client.
> I am wondering why we need the concept of editor here in SVN. What does it
> mean by "for a commit, the client drives and the server consumes (editors)"?
> I am thinking a commit operation, can't we just simply send the delta from
> the client to the server? Why editor?
The editor interfaces in Subversion provide a way for one side to
describe a set of changes and the other side to receive and apply
them. When a commit is happening the client is describing the changes
and the server is receiving them. When an update/switch/status/diff
is happening the server is describing the changes and the client is
receiving them. The delta format is not sufficient to describe all
the changes that can be made, it can only describe content changes of
a file. Subversion, however does not merely version the contents of
the files (as is often the case in most other version control system)
but also versions the tree. So beyond just the delta (which is the
apply_textdelta bit of the editor interface) but you have methods for
adding and removing nodes (file or directories) as well as
manipulating properties that are set on them.
You probably want to read this to understand editors:
Received on 2013-03-31 01:25:13 CET