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

Re: condense_targets and basepath functions

From: Kevin Pilch-Bisson <kevin_at_pilch-bisson.net>
Date: 2001-02-12 13:34:10 CET

On Fri, Feb 09, 2001 at 03:49:22PM -0800, Greg Stein wrote:
> On Fri, Feb 09, 2001 at 11:41:09AM -0500, Kevin Pilch-Bisson wrote:
> > Ben,
> >
> > What do think about what Greg/Karl said? Also should the targets string
> > be modified in place or a new one returned? Finally, what names would
> > like the functions to have? I am thinking:
>
> Careful. He is working on other code right now... Don't distract him :-)
>
> >...[ prototypes ]
>
> I'm thinking it might be nice to go ahead and collapse these into one
> function (condense_targets). Further, to make pbasename be required. Then,
> we could do:
>
> *) rename it pbasedir to make it obvious it is always a dir
> *) targets become *relative* to pbasedir

This sounds like a good idea to me. I was thinking that something like
this would have to be done anyway. Offhand, does anyone know the best
way to convert relative paths to absolute. I looked at realpath(3), but
it doesn't seem very portable, and says Solaris may give relative paths
back. I also looked through APR, and the docs for apr_stat seem to
suggest that it converts paths, but the implementation does nothing of
the sort. I could obviously do it by walking through the string looking
for `.'s and `..'s but I would have thought there would be a standard
way of doing it.

Any ideas.

>
> We could actually make the targets-return-value optional if we wanted.
>
Can do.

> Having the targets as relative values is a bit nicer. It means that we don't
> have to chop them up to remove the absolute portion. When we go to actually
> pass the targets to (say) the RA do_update function, we'll also need to
> convert them to "URL style". But I believe condense_targets should just use
> "local style"... hmm. Maybe a passed-in style?

Will do, I am going to follow local style for now, but it if a
conversion function is written, then this function could easily just
call it on all the paths as we go through them.
>
> [ the WC will pass them as local style, but I could see the function being
> used to condense URLs, too ... ]
>
> Cheers,
> -g
>
> --
> Greg Stein, http://www.lyra.org/
> ____________________________________________________________

-- 
>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Kevin Pilch-Bisson
kevin@pilch-bisson.net
http://www.pilch-bisson.net
PGP Public Key At http://pgp.pilch-bisson.net

  • application/pgp-signature attachment: stored
Received on Sat Oct 21 14:36:21 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.