You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Madan US <ma...@collab.net> on 2005/10/07 22:32:11 UTC
Re: [PATCH] Issue 443 : post-commit hook (error) output lost: Step
5
>> On Thu, 2005-10-06 at 02:21, Peter N. Lundblad wrote:
>> And here's the review...
>
> Pl. find the revised patch attached.
>
Pl. find attached the same patch, but the dup function changed to allocate
and copy.
Regards,
Madan.
Re: [PATCH] Issue 443 : post-commit hook (error) output lost: Step
5
Posted by Julian Foad <ju...@btopenworld.com>.
David James wrote:
>
> There's no official conventions for writing "deep copy" functions, but
> I'd like to make some: If a type is named "svn_foo_bar_t", the "deep
> copy" function should be called "svn_foo_bar_dup". Further, all deep
> copy functions should normally return the new object as a pointer, and
> accept the following two arguments:
> 1. A const pointer to the object you want to copy (e.g. const svn_foo_bar_t *)
> 2. The pool to use to make the deep copy
>
> These conventions make it easier for us to automatically generate code
> that uses the deep copy functions in the SWIG bindings. See r16398 for
> an example. Maybe we should document this in hacking.html?
+1. Please find a good place for it in hacking.html and add this.
- Julian
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: [PATCH] Issue 443 : post-commit hook (error) output lost: Step
5
Posted by Madan U Sreenivasan <ma...@collab.net>.
On Thu, 2005-10-13 at 21:09, Peter N. Lundblad wrote:
> On Mon, 10 Oct 2005, Madan U Sreenivasan wrote:
>
> > On Mon, 2005-10-10 at 20:59, David James wrote:
> > Anyways, here the patch with the changes you had suggested.
> >
> committed in r16697 with some tweaks:
> - Style: docstring tweaks.
> - Pool usage
> - I added a pool argument to svn_commit_callback2_t.
> - I made the log message a bit less verbose, and remove that 3-space
> indentation...
Thanks for the tweaks....
>
> Thanks for the patch. Seems like we should soon be done with what is the
> nearly oldest live issue in the tracker:-)
:) ...yes... three more simple steps and we should be there..
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: [PATCH] Issue 443 : post-commit hook (error) output lost: Step
5
Posted by "Peter N. Lundblad" <pe...@famlundblad.se>.
On Mon, 10 Oct 2005, Madan U Sreenivasan wrote:
> On Mon, 2005-10-10 at 20:59, David James wrote:
> Anyways, here the patch with the changes you had suggested.
>
committed in r16697 with some tweaks:
- Style: docstring tweaks.
- Pool usage
- I added a pool argument to svn_commit_callback2_t.
- I made the log message a bit less verbose, and remove that 3-space
indentation...
Thanks for the patch. Seems like we should soon be done with what is the
nearly oldest live issue in the tracker:-)
Regards,
//Peter
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: [PATCH] Issue 443 : post-commit hook (error) output lost: Step
5
Posted by Madan U Sreenivasan <ma...@collab.net>.
On Mon, 2005-10-10 at 20:59, David James wrote:
> On 10/10/05, Madan U Sreenivasan <ma...@collab.net> wrote:
> > > - Rename this function to "svn_commit_info_dup"
> > np.
> > /me wonders if theres a naming convention that I have missed reading
> > about...
> There's no official conventions for writing "deep copy" functions, but
> I'd like to make some: If a type is named "svn_foo_bar_t", the "deep
> copy" function should be called "svn_foo_bar_dup". Further, all deep
> copy functions should normally return the new object as a pointer, and
> accept the following two arguments:
> 1. A const pointer to the object you want to copy (e.g. const svn_foo_bar_t *)
> 2. The pool to use to make the deep copy
>
> These conventions make it easier for us to automatically generate code
> that uses the deep copy functions in the SWIG bindings. See r16398 for
> an example. Maybe we should document this in hacking.html?
Yes, I think so too, would wait for a coupla days tho, just in case,
anybody else wants to add to that....
Anyways, here the patch with the changes you had suggested.
Regards,
Madan.
Re: [PATCH] Issue 443 : post-commit hook (error) output lost: Step 5
Posted by David James <ja...@gmail.com>.
On 10/10/05, Madan U Sreenivasan <ma...@collab.net> wrote:
> > - Rename this function to "svn_commit_info_dup"
> np.
> /me wonders if theres a naming convention that I have missed reading
> about...
There's no official conventions for writing "deep copy" functions, but
I'd like to make some: If a type is named "svn_foo_bar_t", the "deep
copy" function should be called "svn_foo_bar_dup". Further, all deep
copy functions should normally return the new object as a pointer, and
accept the following two arguments:
1. A const pointer to the object you want to copy (e.g. const svn_foo_bar_t *)
2. The pool to use to make the deep copy
These conventions make it easier for us to automatically generate code
that uses the deep copy functions in the SWIG bindings. See r16398 for
an example. Maybe we should document this in hacking.html?
Cheers,
David
--
David James -- http://www.cs.toronto.edu/~james
Re: [PATCH] Issue 443 : post-commit hook (error) output lost: Step
5
Posted by Madan U Sreenivasan <ma...@collab.net>.
On Mon, 2005-10-10 at 04:35, David James wrote:
> [snip]*
> > + * @note Bothe @a src_commit_info and @a dst_commit_info are
>
> s/Bothe/Both/.
of course. :)
[snip]
> - Rename this function to "svn_commit_info_dup"
np.
/me wonders if theres a naming convention that I have missed reading
about...
> - Instead of accepting dst_commit_info as an argument, return a
> svn_commit_info_t * pointer.
Thats a good idea. I would do it and send it again...
Thanks for the suggestion.
Regards,
Madan.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: [PATCH] Issue 443 : post-commit hook (error) output lost: Step 5
Posted by David James <ja...@gmail.com>.
On 10/7/05, Madan US <ma...@collab.net> wrote:
> >> On Thu, 2005-10-06 at 02:21, Peter N. Lundblad wrote:
> >> And here's the review...
> >
> > Pl. find the revised patch attached.
> >
>
> Pl. find attached the same patch, but the dup function changed to allocate
> and copy.
Hi Madan,
Thanks for your patch! It looks pretty good. I'd like to suggest few
small improvements.
> --- subversion/include/svn_types.h (revision 16478)
> +++ subversion/include/svn_types.h (working copy)
> @@ -339,6 +339,25 @@
> svn_create_commit_info (apr_pool_t *pool);
>
>
> +/**
> + * Perform a deep copy of the @c svn_commit_info_t structure
> + * from @a src_commit_info to @a dst_commit_info.
> + *
> + * @note Bothe @a src_commit_info and @a dst_commit_info are
s/Bothe/Both/.
> + * to be pre-allocated. But the internal memory requirements
> + * are handled from the @a pool.
> + *
> + * This is to provide for extending the svn_commit_info_t in
> + * the future.
> + *
> + * @since New in 1.4
> + */
> +void
> +svn_dup_commit_info (const svn_commit_info_t *src_commit_info,
> + svn_commit_info_t **dst_commit_info,
> + apr_pool_t *pool);
I'd like to make the svn_dup_commit_info function consistent with our
other "deep copy" functions.
- Rename this function to "svn_commit_info_dup"
- Instead of accepting dst_commit_info as an argument, return a
svn_commit_info_t * pointer.
Do you think this is a good idea? This is a small change, so if you
like the change, we can apply it when we commit the patch.
Cheers,
David
--
David James -- http://www.cs.toronto.edu/~james