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

Re: availability of svn_wc_entry->repos

From: Daniel L. Rall <dlr_at_finemaltcoding.com>
Date: 2005-09-28 01:11:31 CEST

On Tue, 27 Sep 2005, Peter N. Lundblad wrote:

> On Mon, 26 Sep 2005, Daniel Rall wrote:
>
> > John wrote:
> > > Daniel L. Rall wrote:
> > > > On Fri, 23 Sep 2005, Peter N. Lundblad wrote:
> > > >>Wrong, svn_wc_entry->repos is populated when the info is in the entries
> > > >>file, which it will be after an update with an 1.3 client, so you can add
> > > >>that whenever you want to. (But bear in mind that it might be null).
> > > >
> > > >
> > > > ...as illustrated by r16145. See r16141 for how to use that info.
> > >
> > > But it appears that only the repos_root entry for the _directory_ is
> > > populated, not for the _files_ contained in that directory.
> >
> > This is consistent with the data I'm seeing in WC .svn/entries files.
> > (There's no reason to duplicate this piece of data.)
> >
> > > Consequently, I cannot create a $ReposPath$ keyword until
> > > there is a way to grab one of the entry values from the directory
> > > given only the file. Or am I missing something?
> >
> > That's my understanding, yes. svn_wc_copy2() opens the existing
> > .svn/entries administrative file, and then gets the svn_wc_entry for the
> > directory being operated upon:
> >
> > SVN_ERR (svn_wc_adm_probe_open3 (&adm_access, NULL, src_path, FALSE, -1,
> > cancel_func, cancel_baton, pool));
> > ...
> > SVN_ERR (svn_wc_entry (&src_entry, svn_wc_adm_access_path (adm_access),
> > adm_access, FALSE, pool));
> >
> Did you try using the entry of the copied item itself? It should work
> equally well and be clearer. (See my other mail replying to John.)

I did not try using the entry of the copied item itself, since I assumed --
incorrectly, I think -- that the it must match the path used to open
adm_access (which is either src_path, or the directory which contained
src_path, as left up to the call to svn_wc_adm_probe_open3()). The following
does appear to work fine, and passes the tests:

--- copy.c (revision 16309)
+++ copy.c (working copy)
@@ -523,8 +523,7 @@
 
   SVN_ERR (svn_wc_entry (&dst_entry, svn_wc_adm_access_path (dst_parent),
                          dst_parent, FALSE, pool));
- SVN_ERR (svn_wc_entry (&src_entry, svn_wc_adm_access_path (adm_access),
- adm_access, FALSE, pool));
+ SVN_ERR (svn_wc_entry (&src_entry, src_path, adm_access, FALSE, pool));
   if ((src_entry->repos != NULL && dst_entry->repos != NULL) &&
       strcmp (src_entry->repos, dst_entry->repos) != 0)
     return svn_error_createf

As I don't need to open another svn_wc_adm_access_t, and I do agree that
doing things this way is more clear, I've committed this change as r16322.

- Dan

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Sep 28 01:12:15 2005

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.