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

Re: weekly report for 2009-06-15~2009-06-20

From: Stefan Sperling <stsp_at_elego.de>
Date: Mon, 22 Jun 2009 15:17:00 +0100

On Mon, Jun 22, 2009 at 09:34:01PM +0800, HuiHuang wrote:
> Hey Stefan,
>
> This week:
> 1. Because function svn_client_commit4() is too long, so I divide it into 3
> functions:
> svn_client_commit4(), this function calls svn_client_collect_commit_packet()
> to collect commit items and do commit at last.
> It updates wcs, too.

OK.

> It corresponds to 1), 5), 6), 7) points in
> subversion\notes\commit-from-multiple-working-copies.txt
>
> svn_client_collect_commit_packet(), this function group the targets by wc,
> and collect commit_items and lock_tokens for every repository.
> It corresponds to 2), 3), 4) points in
> subversion\notes\commit-from-multiple-working-copies.txt

Why is svn_client_collect_commit_packet() public?

Making the function public means that it can be called from outside
of libsvn_client. I don't think we need it to be public. It's enough
to have the public function svn_client_commit4(), isn't it?

I think svn_client_collect_commit_packet can be local to the file
it is being used in (i.e. call it just collect_commit_packet and
mark the function as static).

Please see http://subversion.tigris.org/hacking.html#other-conventions
the paragraph starting with "All published functions, variables, and
structures must be signified with the corresponding library name ..."

> svn_client_create_wc_access(), this function create wc_access for
> each working copy. It corresponds to 3) point in
> subversion\notes\commit-from-multiple-working-copies.txt

OK. But same question: Why is this a public function?

> I have finished the coding of svn_client_collect_commit_packet() and
> svn_client_create_wc_access(), but not tested them.

Sounds good! Can you attach a patch of your current work?
Even if it's not finished yet we could still review it!

> problem:
> 1. I write a new function svn_wc__find_wc_root(), but how should I test it
> independently?

Write a new unit test in tests/libsvn_wc/

> 2. how can I view content of variables except using SVN_ERR_ASSERT()?
> how can I output internal result to see whether it runs as expect?

Run Subversion in a debugger. On Linux, I use gdb. I don't know what
good debugger for Windows is. Anyone?

Thanks,
Stefan
Received on 2009-06-22 16:17:24 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.