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

Re: Question: svn_ra_do_update() and editor->set_path()

From: Ph. Marek <philipp.marek_at_bmlv.gv.at>
Date: 2006-06-01 06:19:27 CEST

On Wednesday 31 May 2006 14:08, Peter N. Lundblad wrote:
> Ph. Marek writes:
> > On Wednesday 31 May 2006 13:13, Peter N. Lundblad wrote:
> > > Ph. Marek writes:
> > > > If this is a new destination, ie. I don't have an old revision
> > > > number, I gave the revision 0. This works fine for the root
> > > > directory in the repository, as that always exists; but if the URL
> > > > points to some subdirectory in the repository I get an error
> > > > "invalid path", as the given path doesn't exist in revision 0.
> > >
> > > Did you try setting start_empty to TRUE, giving the desired revision
> > > you want to check out?
> >
> > You mean that I do a svn_ra_do_update() to the target revision, and then
> > tell the ra layer that I have that directory at HEAD (via
> > SVN_INVALID_REVNUM), but empty?
>
> No, because it might not exist at HEAD. (And I'm not sure if
> SVN_INVALID_REVNUM works in this context).
> You could pretend you have the target revision of the dir in question,
> if you know that the dir exists in that revision. If you don't and
> know that an older revision existed, pretend you have that revision.
> I don't know your use case, but if you're updating from an old
> revision, but still want all the contents, this should work.
Yes, thank you.

I got that working.

You're right; that directory may not exist at HEAD, but then the URL is
invalid. If someone wants to have an older version, there's a (conveniently)
named parameter -r .... :-)

Thank you very much!

Regards,

Phil

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Jun 1 06:19:35 2006

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.