[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: design document

From: Stefan Sperling <stsp_at_elego.de>
Date: Wed, 27 May 2009 15:32:24 +0100

On Wed, May 27, 2009 at 08:32:58AM +0800, HuiHuang wrote:
> Hi,
>
> The following is design document for "commit from multiple woring copies".
> If there is any problem, please tell me and I will modify it.

Thanks, that's very good!

I've committed it in r37850 as file
trunk/notes/commit-from-multiple-working-copies.txt.

To make changes to the file, please send patches for the file,
created with Subversion, from now on.
See http://subversion.tigris.org/hacking.html#patches

Also, note that I have refitted all lines in the file to fit into
80 characters. Please keep lines under 80 characters when you make
changes to the file.

I will try to point out what we could do next, see below.

> 3b) Suggested change for Subversion
>
> I think that !DEGOne Commit, One Transaction!+- is the best(and this is
> also compatible with
> original system). So commit files from different repositories at a time
> and break them into
> several transactions may be not a good idea. And I suggest that we should
> constrain
> committing files in the same repository.

Yes, constraining your project to one repository is a good thing.
Because it will make your task much easier. We can add support
for multiple target repositories later by building on top of the
work you are doing for this project.

> 1. We receives list of paths to commit.

Here, you could add which function in the public API of Subversion
receives this list first (from the perspective of the command line
client), and which functions in the public API of Subversion get to
see the list until it is being used.

> 2. All paths are grouped by wc root path, so we get a map of wc_root:paths
> pairs - one for each working copy.

Here, you could explain what data type we use for the map, and where
we store the map, and give reasons why we want to store the map at
that particular place and not anywhere else.
 
> 3. For each pair in Map we create svn_wc_adm_access_t- wc_access.

Here, you could add information about where the map is created.

> 4. For each wc_access we collect items to commit. Each item refers to its
> wc_access.

Here, you could add information about where and how the items
are collected, and stored into the map.

> 5. If there are more than one working copies, then we check all items by
> its repos_url
> and repos_uuid (fetching it from repos if not available). If they are not
> from the same repository,
> return with error, otherwise, combine them into one group.

Here, you could explain where and how the map is checked,
and which error is returned if the map does not pass the check.
     
> 6. Commit these items as a transaction.

Here, you could add information where and how the items get
committed to the server.
 
> 7. During commit and in post commit code we use that wc_access references
> that is stored
> in each commit item to update corresponding working copy, write and
> execute log files and
> then finally to close all open directories.

Again, we need to know where and how, for each step :)

Thanks!
Stefan
Received on 2009-05-27 16:32:55 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.