Hello,
It works like that:
1. SVNKit receives list of paths to commit.
2. All paths are grouped by wc root path, so we get a map of
wc_root:paths pairs - one for each working copy.
3. For each pair in Map we create SVNWCAccess object which is actually a
collection of directories being opened for commit (same as wc_access set
in native svn).
4. For each wc_access we collect items to commit, same way as for
"normal" commit. Each item refers to its wc_acces. Then we group all
items by its repos_url and repos_uuid (fetching it from repos if not
available).
5. So we have commit items grouped by repository root URL, each item may
refer to its own wc_access (working copy). We call such a group a
"commit packet".
6. 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.
For details you may refer to SVNKit source code, in particular
SVNCommitClient.doCollectCommitItems(...), doCommit(...) and SVNCommitUtil.
Please let me know if you have any further questions.
Alexander Kitaev,
TMate Software,
http://svnkit.com/ - Java [Sub]Versioning Library!
yellow.flying wrote:
>
> Hi,
>
> I come from Subversion community, and I am working on subversion client
> to solve "commit from multiple workingcopies" problem. I know that you have
> solved this problem. would you mind to tell me how do you solve it?
>
> The following is what we want to do.
>
> 1) Expected behaviour
> -- Describe what you want Subversion to do.
> When committing files, listing their paths, no matter whether they belong
> to the same work copy or not, if they all live in the same repository, they
> should be committed in one transaction successfully.
>
> 2) Actual behaviour
> -- Describe what Subversion currently does instead.
> If the committing files belong to the same work copy, they will be committed
> in one transaction successfully.
> Otherwise, if they belong to more than one work copy, svn will output an
> error which indicate that their common ancestor is not a work copy and
> commit action fails.
>
> Thank you very much for your help. Hope to hear from you soon.
>
> Best Regards.
> Hui huang
>
> 2009-05-23
> ------------------------------------------------------------------------
> yellow.flying
---------------------------------------------------------------------
To unsubscribe, e-mail:
svnkit-users-unsubscribe@...
For additional commands, e-mail:
svnkit-users-help@...