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

Re: "serve.c" and "text_deltas" parameter of svn_repos_begin_report

From: Julian Foad <julianfoad_at_btopenworld.com>
Date: 2003-02-06 00:45:07 CET

Greg Hudson wrote:
> On Mon, 2003-02-03 at 17:36, Julian Foad wrote:
>
>>In svnserve/serve.c the two functions "switch_cmd" and "diff" are
>>identical except that one passes TRUE and the other FALSE to the
>>"text_deltas" parameter of svn_repos_begin_report.
>
> I don't really believe in factoring out code which happens to be similar
> despite accomplishing rather different functional goals. "switch" and
> "diff" are very dissimilar operations (certainly more different than
> "switch" and "update"); they just happen to accept the same parameters.
> A change to "switch" is more likely than not to be inapplicable to
> "diff", so combining the implementations doesn't make maintenance any
> easier.

I see what you mean, but I think it's debatable. I'd say maintenance in
the medium term is more likely to involve identical changes to both.
And it took me quite a while of looking at one and then the other to be
certain that there really was no difference other than TRUE/FALSE, and
then that was very puzzling. But I accept your point of view, and am OK
with leaving it alone.

> Now, I would be willing to accept code to factor out, say, the 13 lines
> of code which check for a valid versus_url. That would apply to
> link_path as well as switch_cmd and diff.

That sounds like a good way to go. It should only take a few minutes,
but that will turn into an hour and I need my sleep now.

- Julian

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Feb 6 00:42:47 2003

This is an archived mail posted to the Subversion Dev mailing list.