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

Re: [PATCH] Correct svn_wc_get_pristine_copy_path() comment.

From: Malcolm Rowe <malcolm-svn-dev_at_farside.org.uk>
Date: 2006-06-19 14:53:26 CEST

On Mon, Jun 19, 2006 at 06:30:32PM +0530, Madan U Sreenivasan wrote:
> The comment for svn_wc_get_pristine_copy_path() API currently says that
> the function will return a NULL value for the pristine_path parameter when
> the text-base does not exist. However, this is not so.
>
> I spoke with eh on irc sometime back, and eh felt that this API might
> be used in places where the text-base does not exist, but has to be
> created. For example in case of a cp/mv.
>

Or instead of guessing, you could have looked to see where it is
actually used. svn_wc_get_pristine_copy_path() is a public wrapper
around svn_wc__text_base_path(), and is used in only two places, both
in libsvn_client, supporting cat and export of a BASE revision.

> [[[
> Correct comment for svn_wc_get_pristine_copy_path().
>
> * subversion/include/svn_wc.h
> (svn_wc_get_pristine_copy_path): svn_wc_get_pristine_copy_path() doesnt
> return NULL for the pristine_path parameter, if passed a wc path, for
> which a text-base doesn't exist. Removed part of the comment that says
> so.
> ]]]
>

Too much detail, in my opinion. 'Remove incorrect statement in
doc-comments' or anything similar would be fine.

> /** Given a @a path to a wc file, return a @a pristine_path which points to a
> - * pristine version of the file. This is needed so clients can do
> - * diffs. If the WC has no text-base, return a @c NULL instead of a
> - * path.
> + * pristine version of the file. This is needed so clients can do diffs.
> */

I'd also remove the 'This is needed so clients can do diffs' statement,
since this doesn't appear to be true, and even if it was, we shouldn't
try to justify all the possible reasons a client might want access to the
BASE version of the file. Mentioning the word 'BASE' here might be a good
idea too, since 'pristine' isn't immediately obvious as the same thing.

Regards,
Malcolm

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Jun 19 14:56:19 2006

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.