How I SVN in multiple plugins?

People,

I’ve bumped into a small problem with using SVN to get my plugins.

The first plugin I get is active_scaffold.

I use this syntax:

svn propset svn:externals “active_scaffold
http://activescaffold.googlecode.com/svn/tags/active_scaffold” vendor/
plugins
svn update vendor/plugins
svn commit --message=“SVN’d in Active Scaffold”

svn stat
shows me this:

$ svn stat
X vendor/rails
X vendor/plugins/active_scaffold

Performing status on external item at ‘vendor/rails’

Performing status on external item at ‘vendor/plugins/active_scaffold’

which looks good.

The 2nd plugin I get is acts_as_authenticated.

I use this syntax:

svn propset svn:externals “acts_as_authenticated
http://svn.techno-weenie.net/projects/plugins/acts_as_authenticated
vendor/plugins
svn update vendor/plugins
svn commit --message=“SVN’d in Acts As Authenticated [ AAA ]”

svn stat
shows me this:

$ svn stat
X vendor/rails
X vendor/plugins/acts_as_authenticated
? vendor/plugins/active_scaffold

Performing status on external item at ‘vendor/rails’

Performing status on external item at ‘vendor/plugins/
acts_as_authenticated’

This does not look good.

SVN has ‘forgotten’ my install of active_scaffold.

What is the proper way to use SVN to bring in multiple plugins?

-moi

On 6/9/07, [email protected] [email protected] wrote:

What is the proper way to use SVN to bring in multiple plugins?

Your example is breaking because each time you call propset it
overwrites
the previously stored property. You need to either a) use propedit,
which
will allow you to append to the existing properties value or b) use
piston (
http://piston.rubyforge.org/) which is a much nicer way to vendor
plugins.

Hope that helps.

Josh


Josh K.
[email protected]
http://joshknowles.com

Yep,

piston looks like a good idea.
But…
When I run it to pull in the rel_1-2-3 tag of Rails…

It doesn’t finish. I don’t get my shell prompt back.

All I see is this:

Adding tmp/sessions
Adding tmp/sockets
Adding vendor
Adding vendor/plugins
Transmitting file data …
Committed revision 2.

It is getting me some files; I see them when I use another terminal
window
to look.

I’ll give it an hour to finish and then I’ll kill piston.

-b

Ah,

piston finished:

Adding tmp/pids
Adding tmp/sessions
Adding tmp/sockets
Adding vendor
Adding vendor/plugins
Transmitting file data …
Committed revision 2.

Now, I like piston; piston good.

-b

Hi-again,

I enhanced the script with 4 commands at the end:

svn commit --message=“Rails123, and plugins bolted on”
piston lock vendor/rails
piston lock vendor/plugins/active_scaffold
piston lock vendor/plugins/acts_as_authenticated

-b

Mr K,

I added piston to my way of doing things.

piston syntax is easy.

Here is a demo script which SVN-checks-in a rails project named aaa10.

Then it uses piston to bolt-on…

http://dev.rubyonrails.org/svn/rails/tags/rel_1-2-3
http://activescaffold.googlecode.com/svn/tags/active_scaffold
http://svn.techno-weenie.net/projects/plugins/acts_as_authenticated

The script:

#!/bin/sh

Creates a Subversion repository in REPOS_ROOT/PROJECT. Creates a

Rails

application named PROJECT, and checks it in the newly created

repository.

set -x

PROJECT=aaa10
REPOS_ROOT=/pt/w/fg/svn4aaa10

debug

touch jnk
/bin/rm -rf jnk $REPOS_ROOT/$PROJECT $PROJECT

debug

if [ -d $REPOS_ROOT/$PROJECT ]; then
echo “The repository already exists - this script will not overwrite
the
repository at ‘$REPOS_ROOT/$PROJECT’”
exit 1
fi

if [ -d $PROJECT ]; then
echo “The project already exists - this script will not overwrite the
directory at ‘$PROJECT’”
exit 1
fi

echo “Creating project ‘$PROJECT’, in new repository ‘$REPOS_ROOT’”

mkdir -p $REPOS_ROOT

svnadmin create --fs-type=fsfs $REPOS_ROOT/$PROJECT

REPOS=file://$REPOS_ROOT/$PROJECT

svn mkdir --message=“Initial project layout” $REPOS/trunk $REPOS/tags
$REPOS/branches

rails $PROJECT
cd $PROJECT
svn checkout $REPOS/trunk .

svn add --force .

svn mkdir db/migrate

svn revert log/*
svn propset svn:ignore “*.log” log
svn revert config/database.yml
mv config/database.yml config/database.yml.sample
svn add config/database.yml.sample
svn propset svn:ignore “database.yml” config
cp config/database.yml.sample config/database.yml

svn propset svn:ignore “schema.rb” db

svn propset svn:ignore "" tmp
svn propset svn:ignore “doc" doc
svn propset svn:executable "
find script -type f | grep -v '.svn'
public/dispatch.

svn revert public/index.html
svn commit --message=“New Rails project”

svn propset svn:externals "rails

http://dev.rubyonrails.org/svn/rails/trunk/" vendor

svn propset svn:externals "rails

http://dev.rubyonrails.org/svn/rails/tags/rel_1-2-3" vendor

piston import
http://dev.rubyonrails.org/svn/rails/tags/rel_1-2-3vendor/rails
piston import
http://activescaffold.googlecode.com/svn/tags/active_scaffoldvendor/plugins/active_scaffold
piston import
http://svn.techno-weenie.net/projects/plugins/acts_as_authenticatedvendor/plugins/acts_as_authenticated

exit

-b