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

Re: libsvn_client checkout and multiple targets

From: Kevin Pilch-Bisson <kevin_at_pilch-bisson.net>
Date: 2001-08-24 12:07:38 CEST

On Fri, Aug 24, 2001 at 10:11:28AM +0100, peter.westlake@arm.com wrote:
>
> I can see that this could be helpful for interactive use.
> But if you do implement it, *please* provide a way to defeat it.
> If I write a script that calls Subversion to check out a number
> of projects into a directory, I do *not* want the behaviour to
> alter just because that number happens to be 1. My script would
> have to look at the number of projects, and strip off a directory
> level if there was only the one. And if the script is working from
> data, that doesn't work at all: for instance, "check out the projects
> specified and copy the following list of files from them". The strings
> in the list of files can't magically acquire or lose a path element!
> So I want predictable behaviour, which means I need a way to get
>
> foo/A/one_mississippi.txt
> foo/A/two_mississippi.txt
> foo/A/three_mississippi.txt
>
> Then I can do things like
>
> svn co -d foo $projects # but a different syntax to -d?
> munge foo/*/Makefile
>
> and it works even if $projects only has one entry.

why not make your script
for p in $projects; do
        cvs co -d foo/$p $projects
    # perform your mungining
done

Then you get perfectly predictable behaviour regardless of the number of
projects.

-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Kevin Pilch-Bisson                    http://www.pilch-bisson.net
     "Historically speaking, the presences of wheels in Unix
     has never precluded their reinvention." - Larry Wall
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

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