# SVK and svn:externals for plugins

**URL:** <https://www.ruby-forum.com/t/svk-and-svn-externals-for-plugins/86019>\
**Category:** Rails\
**Created:** [February 19, 2007, 4:14am UTC](https://www.ruby-forum.com/t/svk-and-svn-externals-for-plugins/86019 "2007-02-19T04:14:42Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![diegal](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/7993a0/32.png) [@diegal](https://www.ruby-forum.com/u/diegal)\
**Post date:** [February 19, 2007, 4:14am UTC](https://www.ruby-forum.com/t/svk-and-svn-externals-for-plugins/86019/1 "2007-02-19T04:14:42Z")

</div>

Hi there.

I’m working with svk [1] for the first time (so I can work offline for  
certain periods of time) and have a problem with the plugin script  
because it just supports svn, not svk.

I want to install a plugin with svn:externals but don’t know how to o  
it or if it’s somehow posible.

I know some well known rails developers use svk so I’d like to know  
how they/you manage it considering rails’s strong preference for svn.

Thank you.  
Diego

---

<div class="post-metadata">

**Author:** ![diegal](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/7993a0/32.png) [@diegal](https://www.ruby-forum.com/u/diegal)\
**Post date:** [February 19, 2007, 3:39pm UTC](https://www.ruby-forum.com/t/svk-and-svn-externals-for-plugins/86019/2 "2007-02-19T15:39:54Z")

</div>

On Feb 18, 2007, at 10:13 PM, diegal wrote:

> how they/you manage it considering rails’s strong preference for svn.
> 
> Thank you.  
> Diego

Diego,

svk doesn’t support svn:externals

You can manually do the ‘svk add …’ for all the new resources, but  
I just had the (completely untested) thought that you could put a  
symlink from a ‘svn’ early in your PATH to the svk executable. The  
command that rails uses “svn add -N #{file}” has arguments that match  
svk (similarly for “revert” and “rm”). If you only use svk, you  
might be able to put such an svn-\>svk trick in your PATH  
permanently. (Remember, I said this was _untested_!)

Unless you’re using the (b)leading edge of a plugin, you probably  
need to cut the svn:external off in favor of a copy of the plugin(s)  
at a particular point in time prior to going into production anyway.  
My solution has just been to manually add resources (sometimes with  
something like `svk status | ruby -alne 'if $_ =~ %r{^\?} then puts $F [1..-1] end' | xargs svk add` to add everything not already known).

-Rob

Rob B. [http://agileconsultingllc.com](http://agileconsultingllc.com)  
removed\_email\_address@domain.invalid

---

<div class="post-metadata">

**Author:** ![diegal](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/7993a0/32.png) [@diegal](https://www.ruby-forum.com/u/diegal)\
**Post date:** [February 19, 2007, 4:48pm UTC](https://www.ruby-forum.com/t/svk-and-svn-externals-for-plugins/86019/3 "2007-02-19T16:48:03Z")

</div>

On 19 feb, 12:36, Rob B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> You can manually do the ‘svkadd …’ for all the new resources, but  
> I just had the (completely untested) thought that you could put a  
> symlink from a ‘svn’ early in your PATH to thesvkexecutable. The  
> command that rails uses “svn add -N #{file}” has arguments that match svk(similarly for “revert” and “rm”). If you only usesvk, you  
> might be able to put such an svn-\>svktrick in your PATH  
> permanently. (Remember, I said this was _untested_!)

mmm… maybe something like this could be done… I’ll keep that to  
try sometime.

For now, I just temporarily abandoned svk in favor of svn (knowing I  
can’t commit until being online). I’ll retry using it in a few days.

> Unless you’re using the (b)leading edge of a plugin, you probably  
> need to cut the svn:external off in favor of a copy of the plugin(s)  
> at a particular point in time prior to going into production anyway.  
> My solution has just been to manually add resources (sometimes with  
> something like `svkstatus | ruby -alne 'if $_ =~ %r{^\?} then puts $F [1..-1] end' | xargssvkadd` to add everything not already known).

Jeje. I did something similar based on the svn\_conf generated  
svn.rake.

This is my lib/tasks/svk.rake

namespace :svk do

desc “Add all new files to subversion”  
task :add do  
system “svk status | grep ‘^?’ | sed -e ‘s/? \*//’ | sed -e ‘s/ /  
\ /g’ | xargs svk add”  
end

end

Thank you  
Diego

---

<div class="post-metadata">

**Author:** ![diegal](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/7993a0/32.png) [@diegal](https://www.ruby-forum.com/u/diegal)\
**Post date:** [February 20, 2007, 7:48pm UTC](https://www.ruby-forum.com/t/svk-and-svn-externals-for-plugins/86019/4 "2007-02-20T19:48:37Z")

</div>

Nope. Still doesn’t work. svk just doesn’t know anything about the  
svn:externals property. It means nothing more than if you put a  
“color” property on a directory.

-Rob

Rob B. [http://agileconsultingllc.com](http://agileconsultingllc.com)  
removed\_email\_address@domain.invalid

---

<div class="post-metadata">

**Author:** ![diegal](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/7993a0/32.png) [@diegal](https://www.ruby-forum.com/u/diegal)\
**Post date:** [February 20, 2007, 8:54pm UTC](https://www.ruby-forum.com/t/svk-and-svn-externals-for-plugins/86019/5 "2007-02-20T20:54:51Z")

</div>

Too bad that doesn’t work. However, I’d suggest you use piston to  
manage your plugins. It makes updates faster because it doesn’t hit  
external repo’s on every update. Also, and more importantly IMO, it  
only updates the plugin source when you want it to instead of every  
update between your local sandbox and the repo. Unless you really  
need to be on a plugins bleeding edge, I think it’s better to just  
have piston checkout out the revision of the plugin you need and only  
update it when you need a bug fix or new functionality. Otherwise,  
when you’re constantly updating the plugin source with svn:external,  
you will be fighting intermittent errors when the plugin is changed  
and your code ‘breaks’ even though you changed nothing.

Alex

On Feb 20, 7:54 am, Rob B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![diegal](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/7993a0/32.png) [@diegal](https://www.ruby-forum.com/u/diegal)\
**Post date:** [February 19, 2007, 11:15pm UTC](https://www.ruby-forum.com/t/svk-and-svn-externals-for-plugins/86019/6 "2007-02-19T23:15:04Z")

</div>

I haven’t tried this, but could you ‘initially’ svn:external the  
plugin into the subversion repository. Then after you mirror the repo  
with svk, will sync’ing your mirror with the repo pull the externals  
into your local mirror from that point on?

---

<div class="post-metadata">

**Author:** ![diegal](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/7993a0/32.png) [@diegal](https://www.ruby-forum.com/u/diegal)\
**Post date:** [February 21, 2007, 9:55am UTC](https://www.ruby-forum.com/t/svk-and-svn-externals-for-plugins/86019/7 "2007-02-21T09:55:06Z")

</div>

removed\_email\_address@domain.invalid wrote:

> and your code ‘breaks’ even though you changed nothing.  
> The same strategy works very well with SVK - you mirror the plugin repo,  
> checkout the version you need, copy it in your app and check it in. When  
> you  
> want to update to new version of the plugin, repeat the procedure (or  
> better,  
> write a Rake task to do it for you).

–  
Sava C.
