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

Re: [PATCH] Unifying and fixing the error handling for ra_local and svnserve

From: Greg Hudson <ghudson_at_MIT.EDU>
Date: 2003-08-23 05:30:16 CEST

I'm not sure whether I like the approach of having one bit of code to
test whether a directory looks like a repository root, and another bit
to open it. But it does make certain things simpler. (I tried fixing
the problem without taking that approach, and ran into trouble,
certainly.)

You really shouldn't leave behind variables named "candidate" in the two
functions you gutted. "Candidate" suggests it's in competition with
other possible candidates, but that's not the case any more; it's the
only path we're going to try.

If we're not going to look at repositories which don't have format
files, then check_repos_version() shouldn't try to handle that case. (I
don't think that code ever had any effect, actually; I think by the time
it was introduced, SVN_REPOS__VERSION was already non-zero.)

Your diff against serve.c looks like it's against a slightly old version
of that file.

+ err = svn_io_check_path (svn_path_join (path, SVN_REPOS__FORMAT, pool),
+ &kind, pool);

The second line should line up with the svn_path_join. (There are other
examples of this problem.)

+ if (err)
+ {
+ return svn_error_createf(SVN_ERR_RA_SVN_REPOS_NOT_FOUND, err,
+ "No repository found in '%s'", url);
+ }

Some source files choose to wrap single-statement, multi-line bodies in
braces. serve.c chooses not to. Please do not change that in a
piece-by-piece manner.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Aug 23 05:31:47 2003

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.