SVK and svn:externals for plugins

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

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 Biedenharn http://agileconsultingllc.com Rob@AgileConsultingLLC.com

> Hi there.

> I'm working withsvk[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, notsvk.

> 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 usesvkso I'd like to know > how they/you manage it considering rails's strong preference for svn.

> Thank you. > Diego

Diego,

svkdoesn't support svn:externals

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

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?

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 Biedenharn http://agileconsultingllc.com Rob@AgileConsultingLLC.com

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

apsoto@gmail.com wrote:

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.

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).