scttnlsn / dandelion

Incremental Git repository deployment.
http://scttnlsn.github.io/dandelion
MIT License
738 stars 60 forks source link

Dandelion crashes when the name of a file it's moving contains certain special characters (over FTP) #12

Closed nickmccurdy closed 10 years ago

nickmccurdy commented 11 years ago

Here's my deploy with the issue. This is my first deploy to this site (since deleting all its files), and it's over FTP. Previous deploys to this site without the problematic files worked perfectly.

~/Repos/folder_of_site_to_deploy master ✔ ➜ dandelion deploy
Connecting to [hidden]
Remote revision:      ---
Deploying revision:  [hidden]
[a lot of successful file transfers]
Uploading file: "a_bunch_of_directories/Cap\303\255tulo 5A vocabulary notes 2.doc"
/home/nicolas/.gem/ruby/1.9.1/gems/dandelion-0.3.7/lib/dandelion/git.rb:67:in `show': undefined method `data' for nil:NilClass (NoMethodError)
    from /home/nicolas/.gem/ruby/1.9.1/gems/dandelion-0.3.7/lib/dandelion/deployment.rb:140:in `block in deploy'
    from /home/nicolas/.gem/ruby/1.9.1/gems/dandelion-0.3.7/lib/dandelion/deployment.rb:135:in `each'
    from /home/nicolas/.gem/ruby/1.9.1/gems/dandelion-0.3.7/lib/dandelion/deployment.rb:135:in `deploy'
    from /home/nicolas/.gem/ruby/1.9.1/gems/dandelion-0.3.7/lib/dandelion/command/deploy.rb:50:in `execute'
    from /home/nicolas/.gem/ruby/1.9.1/gems/dandelion-0.3.7/lib/dandelion/application.rb:38:in `block in execute'
    from /home/nicolas/.gem/ruby/1.9.1/gems/dandelion-0.3.7/lib/dandelion/command.rb:80:in `initialize'
    from /home/nicolas/.gem/ruby/1.9.1/gems/dandelion-0.3.7/lib/dandelion/application.rb:36:in `new'
    from /home/nicolas/.gem/ruby/1.9.1/gems/dandelion-0.3.7/lib/dandelion/application.rb:36:in `execute'
    from /home/nicolas/.gem/ruby/1.9.1/gems/dandelion-0.3.7/lib/dandelion/application.rb:7:in `execute'
    from /home/nicolas/.gem/ruby/1.9.1/gems/dandelion-0.3.7/bin/dandelion:7:in `<top (required)>'
    from /home/nicolas/.gem/ruby/1.9.1/bin/dandelion:23:in `load'
    from /home/nicolas/.gem/ruby/1.9.1/bin/dandelion:23:in `<main>'

Filename of first problem file: Capítulo 5A vocabulary notes 2.doc

I'm guessing this is an issue with the accented i.

scttnlsn commented 11 years ago

Looks like Grit (https://github.com/mojombo/grit) is not finding the name in the Git tree object: https://github.com/mojombo/grit/blob/master/lib/grit/tree.rb#L96

I presume this is because the file is not being read with UTF8 encoding. Perhaps an issue should be opened for Grit.

ecurtis commented 11 years ago

I just ran into a similar problem however I tracked it down to a rogue .git folder in a JS library I had installed. Once I removed that everything worked properly.

scttnlsn commented 10 years ago

Could you test this against the latest beta version?

gem install dandelion --version 0.4.0.beta1

scttnlsn commented 10 years ago

Check the latest beta version here: https://rubygems.org/gems/dandelion

scttnlsn commented 10 years ago

Please reopen if this is still an issue with v0.4.0.