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

Re: svn commit: r945788 - in /subversion/trunk/subversion/libsvn_wc: adm_files.c adm_files.h diff.c

From: Julian Foad <julian.foad_at_wandisco.com>
Date: Wed, 19 May 2010 17:48:46 +0100

On Wed, 2010-05-19, Greg Stein wrote:
> On Tue, May 18, 2010 at 13:51, <julianfoad_at_apache.org> wrote:
> > Author: julianfoad
> > Date: Tue May 18 17:51:13 2010
> > New Revision: 945788
> >
> > URL: http://svn.apache.org/viewvc?rev=945788&view=rev
> > Log:
> > Start splitting up the uses of svn_wc__text_base_path() according to their
> > purpose: some wanted the path in order to delete the file, some to read it,
> > some to write it, some to move it. This patch creates and uses a separate
> > function for those callers that need the path to a file to read from.
> >
> > * subversion/libsvn_wc/adm_files.h,
> > subversion/libsvn_wc/adm_files.c
> > (svn_wc__get_working_node_pristine_file): New function.
> >
> > * subversion/libsvn_wc/diff.c
> > (delete_entry, close_file): Use svn_wc__get_working_node_pristine_file()
> > to replace one kind of usage of svn_wc__text_base_path().
>
> I don't understand this. The uses do not necessarily have a WORKING
> node, so the function name doesn't seem right. The diff code might be
> asking for the pristine text associated with the BASE node (cuz there
> is no WORKING).

Yup - I named it very poorly. Rectified in r946268 - renamed to
svn_wc__text_base_path_to_read(), and doc string completely rewritten.

Thanks.
- Julian

> >...
>
> I do understand/agree with the approach -- different names make it
> easier to reason about the code. But I dunno this reason :-P
>
> Cheers,
> -g
Received on 2010-05-19 18:49:23 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.