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

Re: [PATCH]svn_wc_transmit_prop_deltas2-wc-ng

From: Stefan Sperling <stsp_at_elego.de>
Date: Mon, 3 Aug 2009 21:47:22 +0100

On Fri, Jul 31, 2009 at 04:37:42PM +0800, yellow.flying wrote:
> Hey Stefan,
>
> I think you are very busy these days because subversion heads up:
> 1.6.4 on Aug. 4.

Yes, that, and also other things :)

> When I try to design commit based on wc-ng I find it is a little hard
> for me. I do not konw where to start when dig deep into the code. So I
> think it is better to move
> forward little by little.

Sounds like you've made good steps forward. You have received feedback
by Hyrum already, which is good because I am only getting around to
it now, sorry. But I don't have much to add to what he was saying.

Note that Hyrum has done more API revisioning today, e.g. in r38537.
In case you need more examples to look at.

> I make the following patch to try to use wc_db and svn_wc_context_t. I
> know the docstring may be not good. I want to know if I do the right
> thing?

As Hyrum pointed out, you should copy the existing docstring and modify
it, and then add a new docstring for the old function.

Otherwise the docstring looks OK to me.

> [[[
> Add a new function svn_wc_transmit_prop_deltas2. It uses svn_wc_context_t

You don't need to indent your log messages like this.
It is actually easier to copy-paste them from the email
if they are not indented.

Just do:

[[[
Add a new function ....
...
* subversion/...
  (some_function): ...
    ...
...
]]]

> @@ -1469,25 +1466,19 @@
> }
> }
>
> - /* Ensured by harvest_committables(), item->path will never be an
> - excluded path. However, will it be deleted/absent items? I think
> - committing an modification on a deleted/absent item does not make
> - sense. So it's probably safe to turn off the show_hidden flag here.*/
> - SVN_ERR(svn_wc_entry(&tmp_entry, item->path, adm_access, FALSE, pool));
> -
> /* When committing a directory that no longer exists in the
> repository, a "not found" error does not occur immediately
> upon opening the directory. It appears here during the delta
> transmisssion. */
> - err = svn_wc_transmit_prop_deltas
> - (item->path, adm_access, tmp_entry, editor,

Hyrum already told you this, but I'd like to point out that
the old code was wrong here. So it's not your fault.
And I want to provide an example in case it's not clear what Hyrum
meant. There should be nothing between the function's name and the
first opening parenthesis:

good:
     err = svn_wc_transmit_prop_deltas(item->path, ct->wc_ctx,
                                       editor, ...

also good (but try to avoid this if possible):
     err = svn_wc_transmit_prop_deltas(
             item->path, ct->wc_ctx, editor, ...

bad:
     err = svn_wc_transmit_prop_deltas (item->path, ct->wc_ctx,
                                        editor, ...

also bad:
     err = svn_wc_transmit_prop_deltas
             (item->path, ct->wc_ctx, editor, ...

Stefan

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2379722
Received on 2009-08-03 22:48:01 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.