After Upgrading Fisheye Crucible, Text Files Are Reported as Binary Files
Problem
Fisheye/Crucible has been upgraded to a new version and some of the files in a review that used to show up as text files now show up as binary and thus no code is displayed.
Navigating to the file within Fisheye, it shows up correctly as non-binary file and you can see the file in annotated view.
Cause
Each file in a review has a flag to say whether a file is binary or not. For the files in the review (where the files are showing up as binary) this was not set (because the review was created in an earlier version of Crucible where this was not set) and thus crucible checks its list of file mapping found in FISHEYE_INST/raw-mime.types
to determine whether it is a binary file or not.
As the file extension is not mapped to a file, these files are considered binary.
Resolution
Considering for example that the files that are showing up as binary are .pl
and .cgi
files:
- Open for editing your
<Fisheye installation directory>/raw-mime.types
file. Find the following line, and change it from:
text/plain asc txt java jsp asp cs idl cpp cxx c h pl pod py sh awk sed sql jspf tag
to:
text/plain asc txt java jsp asp cs idl cpp cxx c h pl pod py sh awk sed sql jspf tag pl cgi
- Restart Fisheye/Crucible.
Now when a .cgi
or .pl
file in a Crucible review does not have the isbinary
flag set, Crucible will check this mapping and set these as plain text files.
If you have any other files that mistakenly show up as binary, please add them to this list and restart Fisheye/Crucible.