Unable to piston Rails branch

2 views
Skip to first unread message

Mike Gunderloy

unread,
Jul 18, 2009, 9:53:44 PM7/18/09
to piston-d...@googlegroups.com
With piston 2.0.3:

Phoenix ~/scratch/t5 [master] $ piston import --commit 2-3-stable
git://github.com/rails/rails.git vendor/rails
INFO main: Guessing the repository type
INFO main: Guessing the working copy type
/Library/Ruby/Gems/1.8/gems/piston-2.0.3/lib/piston/git/client.rb:
57:in `run_real': "git checkout -b my-2-3-stable 2-3-stable" exited
with status: 128 (Piston::Git::Client::CommandError)
fatal: git checkout: updating paths is incompatible with switching
branches.
Did you intend to checkout '2-3-stable' which can not be resolved as
commit?
from /Library/Ruby/Gems/1.8/gems/piston-2.0.3/lib/piston/git/
client.rb:34:in `run_cmd'
from /Library/Ruby/Gems/1.8/gems/piston-2.0.3/lib/piston/git/
client.rb:21:in `git'
from /Library/Ruby/Gems/1.8/gems/piston-2.0.3/lib/piston/git/
commit.rb:24:in `git'
from /Library/Ruby/Gems/1.8/gems/piston-2.0.3/lib/piston/git/
commit.rb:52:in `checkout_to'
from /Library/Ruby/Gems/1.8/gems/piston-2.0.3/lib/piston/git/
commit.rb:51:in `chdir'
from /Library/Ruby/Gems/1.8/gems/piston-2.0.3/lib/piston/git/
commit.rb:51:in `checkout_to'
from /Library/Ruby/Gems/1.8/gems/piston-2.0.3/lib/piston/
working_copy.rb:183:in `import'
from /Library/Ruby/Gems/1.8/gems/piston-2.0.3/lib/piston/commands/
import.rb:38:in `run'
from /Library/Ruby/Gems/1.8/gems/piston-2.0.3/lib/piston/commands/
import.rb:49:in `start'
from /Library/Ruby/Gems/1.8/gems/piston-2.0.3/lib/piston/cli.rb:67:in
`start'
from /Library/Ruby/Gems/1.8/gems/piston-2.0.3/lib/piston/cli.rb:121
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in
`gem_original_require'
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `require'
from /Library/Ruby/Gems/1.8/gems/piston-2.0.3/bin/piston:5
from /usr/bin/piston:19:in `load'
from /usr/bin/piston:19

Mike Gunderloy

unread,
Jul 19, 2009, 9:27:17 AM7/19/09
to Piston
So, answering my own question . When you run:

piston import --commit 2-3-stable git://github.com/rails/rails.git
vendor/rails

Piston does:

git clone git://github.com/rails/rails.git vendor/rails
git checkout -b my-2-3-stable 2-3-stable

What it should do:

git clone git://github.com/rails/rails.git vendor/rails
git checkout -b my-2-3-stable origin/2-3-stable

Looks to me like this should be a fairly simple change in lib/piston/
git/commit.rb in checkout_to. But I haven't read through all the
piston source sufficiently to be confident about a fix yet.

Alternatively, this command will work with the current Piston code:

piston import --commit origin/2-3-stable git://github.com/rails/rails.git
vendor/rails

In which case the documentation[1] should be updated as a fix.

[1] http://piston.rubyforge.org/import.html

François Beausoleil

unread,
Jul 20, 2009, 9:39:51 AM7/20/09
to piston-d...@googlegroups.com
Hey Mike,

You're right, I forgot about the origin/ part. I have some kind of
fuzzy memory about why I didn't do it that way. Can't remember why
though.

Anyway, I'll change the code and push.

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

François Beausoleil

unread,
Jul 20, 2009, 11:15:48 AM7/20/09
to piston-d...@googlegroups.com
Mike, what version of Git do you have? My 1.6.0.1 version will create
the branch even if the remote's name is left unspecified.

I'll add it because it doesn't cause any failures. Look at v2.0.4.

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

Le 2009-07-19 à 09:27, Mike Gunderloy a écrit :

>

Mike Gunderloy

unread,
Jul 20, 2009, 11:56:06 AM7/20/09
to piston-d...@googlegroups.com
I'm on 1.6.3.1 on the box where I'm seeing failures.

Mike

François Beausoleil

unread,
Jul 20, 2009, 2:50:16 PM7/20/09
to piston-d...@googlegroups.com
Maybe my version is the laxer one? Anyway, try 2.0.4 and tell me how
it goes.

Thanks!

Mike Gunderloy

unread,
Jul 21, 2009, 8:44:49 AM7/21/09
to piston-d...@googlegroups.com
Still seeing the same problem:

/Library/Ruby/Gems/1.8/gems/piston-2.0.4/lib/piston/git/client.rb:

57:in `run_real': "git checkout -b my-2-3-stable 2-3-stable" exited
with status: 128 (Piston::Git::Client::CommandError)
fatal: git checkout: updating paths is incompatible with switching
branches.
Did you intend to checkout '2-3-stable' which can not be resolved as
commit?

from /Library/Ruby/Gems/1.8/gems/piston-2.0.4/lib/piston/git/
client.rb:34:in `run_cmd'
from /Library/Ruby/Gems/1.8/gems/piston-2.0.4/lib/piston/git/
client.rb:21:in `git'
from /Library/Ruby/Gems/1.8/gems/piston-2.0.4/lib/piston/git/
commit.rb:24:in `git'
from /Library/Ruby/Gems/1.8/gems/piston-2.0.4/lib/piston/git/
commit.rb:54:in `checkout_to'
from /Library/Ruby/Gems/1.8/gems/piston-2.0.4/lib/piston/git/
commit.rb:51:in `chdir'
from /Library/Ruby/Gems/1.8/gems/piston-2.0.4/lib/piston/git/
commit.rb:51:in `checkout_to'
from /Library/Ruby/Gems/1.8/gems/piston-2.0.4/lib/piston/
working_copy.rb:183:in `import'
from /Library/Ruby/Gems/1.8/gems/piston-2.0.4/lib/piston/commands/
import.rb:38:in `run'
from /Library/Ruby/Gems/1.8/gems/piston-2.0.4/lib/piston/commands/
import.rb:49:in `start'
from /Library/Ruby/Gems/1.8/gems/piston-2.0.4/lib/piston/cli.rb:67:in
`start'
from /Library/Ruby/Gems/1.8/gems/piston-2.0.4/lib/piston/cli.rb:121


from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in
`gem_original_require'
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `require'

from /Library/Ruby/Gems/1.8/gems/piston-2.0.4/bin/piston:5


from /usr/bin/piston:19:in `load'
from /usr/bin/piston:19

François Beausoleil

unread,
Jul 21, 2009, 9:41:08 AM7/21/09
to piston-d...@googlegroups.com
Oh wow... Such a stupid thing. I wrote the code, but forgot the
final change: http://github.com/francois/piston/commit/55881613876b7ce1704b0e20cf8bd75fc5166fea

Anyway, 2.0.5 should be available on Rubyforge shortly.

Bye!

Mike Gunderloy

unread,
Jul 21, 2009, 1:27:39 PM7/21/09
to piston-d...@googlegroups.com
2.0.5 looks good. Thanks!

Mike

Reply all
Reply to author
Forward
0 new messages