On Mon, 26 Sep 2005, John Peacock wrote:
> Daniel Rall wrote:
> > This is consistent with the data I'm seeing in WC .svn/entries files.
> > (There's no reason to duplicate this piece of data.)
> Except that all of the keyword management is happening at the lowest level (i.e.
> just the file entries are available and it's too late to get anything from the
> containing directory).
That's not a problem. Just run svn info on a file and see what's there.
Repository root. And info just looks at the file entry.
> > Erik Hülsmann pointed out that it would be nice if files inherited the repos
> > setting of their parent directory. I have not confirmed whether this is
> > occuring for this case in the source code (though take_from_entry() and
> > svn_wc__atts_to_entry() in libsvn_wc/entries.c look promising).
> Yeah, take_from_entry() already as code there to do this:
> if (! dst->repos)
> dst->repos = src->repos;
> but later on in write_entry() we see these comments:
> /*** Now, remove stuff that can be derived through inheritance rules. ***/
> /* Avoid writing repository root if that's the same as this_dir. */
> so now I know why I'm not seeing anything in the .svn/entries file
> except at the directory level. If we were going to permit a little
> duplication, we could just adjust that code to always print out the
> repos for files and directories.
Why? The repository root would be written if it was different than that of
the this_dir entry, like other fields like revision and uuid. But this
shouldn't happen in practice. NOte that this is just a storage
optimization, that should be transparent to the API user.
> However, I also don't think just copying over the parent's entry data is
> the way to go in the more general case. The knowledge that the
> information is being inherited is just as important as what value is
> being inherited.
I don't follow you here, but maybe the above answer clarifies enough.
So, to conclude, svn_wc_entry->repos is populated for files and
directories in 1.3 and beyond for all WCs except ones that were checked
out with an older client and for which no update or switch has been done.
So, you need to be prepared for this to be NULL (if nothing else, the
repository could be corrupt, and the entries code doesn't check against
this). But you don't need to wory about inheritance, since that's an
Hope this helps,
To unsubscribe, e-mail: firstname.lastname@example.org
For additional commands, e-mail: email@example.com
Received on Tue Sep 27 08:15:03 2005