# How I SVN in multiple plugins?

**URL:** <https://www.ruby-forum.com/t/how-i-svn-in-multiple-plugins/106407>\
**Category:** Rails\
**Created:** [June 10, 2007, 1:49am UTC](https://www.ruby-forum.com/t/how-i-svn-in-multiple-plugins/106407 "2007-06-10T01:49:08Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [June 10, 2007, 1:49am UTC](https://www.ruby-forum.com/t/how-i-svn-in-multiple-plugins/106407/1 "2007-06-10T01:49:08Z")

</div>

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](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](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

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [June 10, 2007, 2:36am UTC](https://www.ruby-forum.com/t/how-i-svn-in-multiple-plugins/106407/2 "2007-06-10T02:36:12Z")

</div>

On 6/9/07, removed\_email\_address@domain.invalid [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) 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/](http://piston.rubyforge.org/)) which is a much nicer way to vendor  
plugins.

Hope that helps.

Josh

–  
Josh K.  
removed\_email\_address@domain.invalid  
[http://joshknowles.com](http://joshknowles.com)

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [June 10, 2007, 2:53am UTC](https://www.ruby-forum.com/t/how-i-svn-in-multiple-plugins/106407/3 "2007-06-10T02:53:13Z")

</div>

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.

- piston import  
[http://dev.rubyonrails.org/svn/rails/tags/rel\_1-2-3vendor/rails](http://dev.rubyonrails.org/svn/rails/tags/rel_1-2-3vendor/rails)

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

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [June 10, 2007, 2:57am UTC](https://www.ruby-forum.com/t/how-i-svn-in-multiple-plugins/106407/4 "2007-06-10T02:57:14Z")

</div>

Ah,

piston finished:

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

- piston import  
[http://dev.rubyonrails.org/svn/rails/tags/rel\_1-2-3vendor/rails](http://dev.rubyonrails.org/svn/rails/tags/rel_1-2-3vendor/rails)  
Exported r6984 from  
‘[http://dev.rubyonrails.org/svn/rails/tags/rel\_1-2-3](http://dev.rubyonrails.org/svn/rails/tags/rel_1-2-3)’ to  
‘vendor/rails’
- exit

Now, I like piston; piston good.

-b

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [June 10, 2007, 3:34am UTC](https://www.ruby-forum.com/t/how-i-svn-in-multiple-plugins/106407/5 "2007-06-10T03:34:23Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [June 10, 2007, 3:23am UTC](https://www.ruby-forum.com/t/how-i-svn-in-multiple-plugins/106407/6 "2007-06-10T03:23:22Z")

</div>

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://dev.rubyonrails.org/svn/rails/tags/rel_1-2-3)  
[http://activescaffold.googlecode.com/svn/tags/active\_scaffold](http://activescaffold.googlecode.com/svn/tags/active_scaffold)  
[http://svn.techno-weenie.net/projects/plugins/acts\_as\_authenticated](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/](http://dev.rubyonrails.org/svn/rails/trunk/)" vendor

# svn propset svn:externals "rails

[http://dev.rubyonrails.org/svn/rails/tags/rel\_1-2-3](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](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](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](http://svn.techno-weenie.net/projects/plugins/acts_as_authenticatedvendor/plugins/acts_as_authenticated)

exit

-b
