exception when viewing differences on cvs
Hi. Sometimes when viewing differences of a revision on a cvs repository, following exception shows up:
TypeError in RepositoriesController#diff can't convert nil into Array RAILS_ROOT: /home/peter/Programmeren/aptanaworkspace/Redmine2 Application Trace | Framework Trace | Full Trace app/models/repository/cvs.rb:79:in `+' app/models/repository/cvs.rb:79:in `diff'
The cause of the diff equal to nil is probably that diffing some files failed because they're binary. The error output on the console was full of messages like:
cvs rdiff: failed to read diff file header /tmp/cvsGytOZS for squareInspector.tiff,v: end of file cvs rdiff: failed to read diff file header /tmp/cvsAl72mL for squareMarker.tiff,v: end of file cvs rdiff: failed to read diff file header /tmp/cvsoFBj1o for triangleInspector.tiff,v: end of file cvs rdiff: failed to read diff file header /tmp/cvseEAuFh for triangleMarker.tiff,v: end of file
The exception can be reproduced by using following repository (rev 2 fails):
Reproducible on both trunk (r1524) and 0.7.1
CVS client and server versions are 1.12.13