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

[RFC] Change svn_wc_add_repos_file4(copyfrom_url) to (_root, _relpath)

From: Julian Foad <julian.foad_at_wandisco.com>
Date: Thu, 12 Aug 2010 14:43:29 +0100

svn_wc_add_repos_file4(..., copyfrom_url, ...) has a check that says,

  "If copyfrom_url isn't in the same repository as the WC target parent
dir, then SVN_ERR_UNSUPPORTED_FEATURE."

Semantically, yes, copying from another repos isn't yet supported. But
the check for that should be at a higher and/or lower level.

The only reason it checks *at this level* is because it wants to know
the repos_root so it can calculate the repos_relpath which is required
for the DB. And this is a cheap way of finding the repos root.

Proposal:

  * Change this API to take copyfrom_repos_root and
copyfrom_repos_relpath instead.

  * Remove this check and relpath calculation from its implementation.

  * Update the callers (two in libsvn_client, one in libsvn_wc).

  * For back-compat, move the check and _relpath calculation into
svn_wc_add_repos_file3().

That wouldn't change any behaviour right now, but would remove an
obstacle for later improvements.

I'm thinking this change fits into a generally desirable pattern of
moving towards keeping repos_root and repos_relpath separate.
Especially in the RA and repository side APIs, I assume, but makes sense
to do so in other parts of the libraries as well.

Any concerns? If not I'll try to do it.

- Julian
Received on 2010-08-12 15:44:20 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.