[rspec-devel] [ rspec-Bugs-11296 ] svn export gives errors

noreply at rubyforge.org noreply at rubyforge.org
Sun Jun 3 21:05:40 EDT 2007


Bugs item #11296, was opened at 2007-06-01 18:47
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=3149&aid=11296&group_id=797

Category: rails plugin
Group: None
>Status: Closed
Resolution: Accepted
Priority: 3
Submitted By: Jim Morris (wolfmanjm)
Assigned to: Aslak Hellesøy (aslak_hellesoy)
Summary: svn export gives errors

Initial Comment:
Trying to import via piston (svn export) there is an inconsistent line ending error...

> piston import svn://rubyforge.org/var/svn/rspec/tags/CURRENT/rspec_on_rails vendor/plugins/rspec_on_rails
svn: File 'vendor/plugins/rspec_on_rails/lib/spec/rails/version.rb' has inconsistent newlines
svn: Inconsistent line ending style
/usr/lib/ruby/gems/1.8/gems/piston-1.3.3/lib/piston/command.rb:43:in `svn': Command svn add --force --quiet vendor/plugins/rspec_on_rails resulted in an error: (RuntimeError)

        from /usr/lib/ruby/gems/1.8/gems/piston-1.3.3/lib/piston/commands/import.rb:50:in `run'
        from /usr/lib/ruby/gems/1.8/gems/piston-1.3.3/lib/transat/parser.rb:131:in `execute'
        from /usr/lib/ruby/gems/1.8/gems/piston-1.3.3/lib/transat/parser.rb:127:in `each'
        from /usr/lib/ruby/gems/1.8/gems/piston-1.3.3/lib/transat/parser.rb:127:in `execute'
        from /usr/lib/ruby/gems/1.8/gems/piston-1.3.3/lib/transat/parser.rb:104:in `parse_and_execute'
        from /usr/lib/ruby/gems/1.8/gems/piston-1.3.3/bin/piston:10
        from /usr/bin/piston:16:in `load'
        from /usr/bin/piston:16


----------------------------------------------------------------------

>Comment By: Aslak Hellesøy (aslak_hellesoy)
Date: 2007-06-03 21:05

Message:
Thanks for the heads up. I'll close this then :-)

----------------------------------------------------------------------

Comment By: Rick Tessner (ricktessner)
Date: 2007-06-03 20:47

Message:
Sorry, the fix you put in with the rake task did work.  I got bit by not paying attention to my command history.  I was still working with CURRENT rather than trunk.

The rake task you put in place did work.

----------------------------------------------------------------------

Comment By: Rick Tessner (ricktessner)
Date: 2007-06-03 20:39

Message:
Just tried doing a "piston import" as well as a plugin install followed by "svn add" and got the same message about "inconsistent newlines"

To set the svn:eol-style property across a large number of files, using the following on a Mac or *nix system should do it:

find . -name '.svn' -prune -o -type f | \
xargs svn ps svn:eol-style native

svn commit

NOTE: The above assumes that (1) you're cd'd to the top-level dir of the plugin source and (2) that all files in the plugin are text files.  (I took a quick look thru the plugin source and didn't see anything that looked like binary data. ie images, pdf, etc)

----------------------------------------------------------------------

Comment By: Aslak Hellesøy (aslak_hellesoy)
Date: 2007-06-03 19:19

Message:
Fixed in r2075 (hopefully)

The fix was done by adding a fix_cr_lf task to the root Rakefile which now runs before every commit. No futzing with svn:eol-style should be necessary (we'd have to set it on a lot of files, not only version.rb)

Someone please confirm whether this is working or not and I'll close this.

----------------------------------------------------------------------

Comment By: Rick Tessner (ricktessner)
Date: 2007-06-03 17:39

Message:
I'm seeing the same error about "inconsistent line ending style" on version.rb.

I'd guess that it's happening on my system since I have a line in my subversion config [auto-props] section that reads

*.rb = svn:eol-style=native

It looks like none of the *.rb files in rspec where checked in with the svn:eol-style property set.  In the event of having developers on multiple platforms (ie. *nix-style and windows), both *nix and windows style line endings can end up in a given file.

Upon svn import on another system that by default trys to set the svn:eol-style to native, the mixed line-ending styles will result in the error being seen by the OP and myself.

The solution would be to get the line-endings into a consistent state via a utility such as dos2unix, make sure the plugin still works, set the svn:eol-style property to "native" and commit.

Hope this helps.

----------------------------------------------------------------------

Comment By: Jim Morris (wolfmanjm)
Date: 2007-06-01 20:26

Message:
I'm using svn, version 1.4.3 (r23084)
on Ubuntu Linux Feisty.
piston (1.3.3)

It actually checked out ok, but the failure was on the svn add

The file
vendor/plugins/rspec_on_rails/lib/spec/rails/version.rb had
DOS style line endings, but was inconsistent, so some \n and
some \r\n When I did a dos2unix on the file it worked fine.


----------------------------------------------------------------------

Comment By: David Chelimsky (dchelimsky)
Date: 2007-06-01 19:28

Message:
I'm not experiencing this. I'm using Mac OS 10.4.9, piston 1.3.3 and svn 1.4.3. You?

----------------------------------------------------------------------

You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=3149&aid=11296&group_id=797


More information about the rspec-devel mailing list