Update of git versioned piston import fails

1 view
Skip to first unread message

Kieran P

unread,
Apr 5, 2009, 6:05:05 PM4/5/09
to Piston
Hey,

I can't find a bug tracker link for this project, so I'll post here
for the time being if no one minds.

I've been using piston for a while but have run into an issue when I
update a directory managed by piston.

It was imported using a git:// url, and I did a simple

piston update vendor/plugins/routing-filter/

The result is below. As you'll see, I start off in 1-3-prep-work,
update the plugin, it fails, and I wind up in a new branch. This is
using the latest piston gem available (2.0.1).

$ git checkout 1-3-prep-work
Switched to branch "1-3-prep-work"
$ piston update vendor/plugins/routing-filter/
INFO main: Updating from commit to commit
/opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/
piston-2.0.1/lib/piston/git/working_copy.rb:68:in `add': undefined
method `exist?' for "lib/routing_filter/force_extension.rb":String
(NoMethodError)
from /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/
piston-2.0.1/lib/piston/git/working_copy.rb:67:in `each'
from /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/
piston-2.0.1/lib/piston/git/working_copy.rb:67:in `add'
from /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/
piston-2.0.1/lib/piston/git/working_copy.rb:66:in `chdir'
from /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/
piston-2.0.1/lib/piston/git/working_copy.rb:66:in `add'
from /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/
piston-2.0.1/lib/piston/working_copy.rb:237:in `update'
from /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/
piston-2.0.1/lib/piston/commands/update.rb:25:in `run'
from /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/
piston-2.0.1/lib/piston/commands/update.rb:36:in `start'
from /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/
piston-2.0.1/lib/piston/commands/update.rb:34:in `each'
from /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/
piston-2.0.1/lib/piston/commands/update.rb:34:in `start'
from /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/
piston-2.0.1/lib/piston/cli.rb:67:in `start'
from /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/
piston-2.0.1/lib/piston/cli.rb:121
from /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/site_ruby/1.8/
rubygems/custom_require.rb:31:in `gem_original_require'
from /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/site_ruby/1.8/
rubygems/custom_require.rb:31:in `require'
from /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/
piston-2.0.1/bin/piston:5
from /opt/ree-latest/bin/piston:19:in `load'
from /opt/ree-latest/bin/piston:19
$ git status
# On branch my-db1530bcbd3e885e38cfc3d94e285b69597007ba

François Beausoleil

unread,
Apr 5, 2009, 6:35:58 PM4/5/09
to piston-d...@googlegroups.com
Hello Kieran,

The right avenue for support at this point is this group.

Apparently, #exist? was called on a String when I expected a
Pathname. Could you try with MRI to see if it's an implementation
issue with Dir?

Also, the fact that you're on a separate branch is normal. Piston's
Git support branches to do it's integration. Look at
Piston::Git::WorkingCopy http://github.com/francois/piston/blob/master/lib/piston/git/working_copy.rb#L88

Thanks for reporting the bug. I'll also try to reproduce on MRI/1.9.1
and see if that bug exists there.

Bye!
--
François Beausoleil
http://blog.teksol.info/
http://piston.rubyforge.org/

Imobach González Sosa

unread,
Jun 2, 2009, 4:05:58 PM6/2/09
to Piston
On 5 abr, 23:35, François Beausoleil <francois.beausol...@gmail.com>
wrote:
Same problem here running Ruby 1.8.7 (x86) on Arch Linux.

It fails when some file has been added to the original git repo.
AFAIK, Piston::Git::Commit#update_to method returns an array
containing three arrays (for added, deleted and renamed files). The
elements in those arrays are strings. The 'added' array is passed to
Piston::Git::WorkingCopy#add method, which fails.

Any idea about this issue?

Thanks in advance!
Reply all
Reply to author
Forward
0 new messages