# Piston 1.3.2: More switch corrections

**URL:** <https://www.ruby-forum.com/t/piston-1-3-2-more-switch-corrections/88313>\
**Category:** Ruby\
**Created:** [March 9, 2007, 4:45pm UTC](https://www.ruby-forum.com/t/piston-1-3-2-more-switch-corrections/88313 "2007-03-09T16:45:42Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![fbeausoleil](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/ec9cab/32.png) [@fbeausoleil](https://www.ruby-forum.com/u/fbeausoleil)\
**Post date:** [March 9, 2007, 4:45pm UTC](https://www.ruby-forum.com/t/piston-1-3-2-more-switch-corrections/88313/1 "2007-03-09T16:45:42Z")

</div>

Sorry for the double message, but I found another bug in the piston  
switch subcommand. This warranted another patch release, or else it  
would have been unusable.

= What is it ?

Piston is a utility that eases vendor branch management.  
This is similar to svn:externals, except you have a local copy  
of  
the files, which you can modify at will. As long as the changes are  
mergeable, you should have no problems.

= What’s changed ?

2007-03-09 1.3.2

- piston switch had a bad constant access which caused failures.

= Installation

sudo gem install --include-dependencies piston

Enjoy !

---

<div class="post-metadata">

**Author:** ![fbeausoleil](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/ec9cab/32.png) [@fbeausoleil](https://www.ruby-forum.com/u/fbeausoleil)\
**Post date:** [March 9, 2007, 4:53pm UTC](https://www.ruby-forum.com/t/piston-1-3-2-more-switch-corrections/88313/2 "2007-03-09T16:53:43Z")

</div>

On 3/9/07, François Beausoleil [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> = What’s changed ?
> 
> 2007-03-09 1.3.2
> 
> - piston switch had a bad constant access which caused failures.
> 
> = Installation
> 
> sudo gem install --include-dependencies piston

Ok, say I have checked out code from some remote repo using piston in  
“/vendor/plugins” directory of rails and have modified the plugin.  
Now, I want to checkin these modifications to the remote repository,  
so that other people can also get the new code.

So, how does piston solve this problem? can i checkin my plugin from  
RAILS\_ROOT, assuming RAILS\_ROOT is associated with different SVN repo  
and plugin has been downloaded from different svn repo?

---

<div class="post-metadata">

**Author:** ![fbeausoleil](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/ec9cab/32.png) [@fbeausoleil](https://www.ruby-forum.com/u/fbeausoleil)\
**Post date:** [March 9, 2007, 5:58pm UTC](https://www.ruby-forum.com/t/piston-1-3-2-more-switch-corrections/88313/3 "2007-03-09T17:58:10Z")

</div>

Hi !

2007/3/9, hemant [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

> Ok, say I have checked out code from some remote repo using piston in  
> “/vendor/plugins” directory of rails and have modified the plugin.  
> Now, I want to checkin these modifications to the remote repository,  
> so that other people can also get the new code.
> 
> So, how does piston solve this problem? can i checkin my plugin from  
> RAILS\_ROOT, assuming RAILS\_ROOT is associated with different SVN repo  
> and plugin has been downloaded from different svn repo?

At the moment, Piston provides no help to do that. The best you could  
do is determine what changes you made using svn log, and then svn diff  
the relevant revisions. There already is a feature request by Evan  
Weaver for this.

I believe this is something Piston should handle, so it will be in the  
next minor revision.

Thanks for using Piston !

---

<div class="post-metadata">

**Author:** ![fbeausoleil](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/ec9cab/32.png) [@fbeausoleil](https://www.ruby-forum.com/u/fbeausoleil)\
**Post date:** [March 9, 2007, 6:57pm UTC](https://www.ruby-forum.com/t/piston-1-3-2-more-switch-corrections/88313/4 "2007-03-09T18:57:42Z")

</div>

Hello Francois!

It seems there are still some problems with switch:

here’s what happens when i try to switch my rspec\_on\_rails plugin from  
the 0\_8\_1 tag to the 0\_8\_2 tag:

zen% piston switch  
svn://rubyforge.org/var/svn/rspec/tags/REL\_0\_8\_2/rspec\_on\_rails/vendor/plugins/rspec\_on\_rails  
vendor/plugins/rspec\_on\_rails  
Processing ‘vendor/plugins/rspec\_on\_rails’…  
Fetching remote repository’s latest revision and UUID  
Restoring remote repository to known state at r1561  
Updating remote repository to  
svn://rubyforge.org/var/svn/rspec/tags/REL\_0\_8\_2/rspec\_on\_rails/vendor/plugins/rspec\_on\_rails@1560  
svn: Target path does not exist  
/opt/local/lib/ruby/gems/1.8/gems/piston-1.3.2/lib/piston/command.rb:47:in  
`svn’: Command svn switch --revision 1560  
svn://rubyforge.org/var/svn/rspec/tags/REL\_0\_8\_2/rspec\_on\_rails/vendor/plugins/rspec\_on\_rails  
vendor/plugins/rspec\_on\_rails.tmp resulted in an error: (RuntimeError)

```
    from 

```

/opt/local/lib/ruby/gems/1.8/gems/piston-1.3.2/lib/piston/commands/switch.rb:51:in  
`switch' from /opt/local/lib/ruby/gems/1.8/gems/piston-1.3.2/lib/piston/commands/switch.rb:9:in`run’  
from  
/opt/local/lib/ruby/gems/1.8/gems/piston-1.3.2/lib/transat/parser.rb:131:in  
`execute' from /opt/local/lib/ruby/gems/1.8/gems/piston-1.3.2/lib/transat/parser.rb:127:in`each’  
from  
/opt/local/lib/ruby/gems/1.8/gems/piston-1.3.2/lib/transat/parser.rb:127:in  
`execute' from /opt/local/lib/ruby/gems/1.8/gems/piston-1.3.2/lib/transat/parser.rb:104:in`parse\_and\_execute’  
from  
/opt/local/lib/ruby/gems/1.8/gems/piston-1.3.2/bin/piston:10  
from /opt/local/bin/piston:16:in `load’  
from /opt/local/bin/piston:16

regards  
chris
