Fisheye fails to index a repository and throws unsupported filetype / unable to read files to diff
Problem
The following appears in the Fisheye logs when after setting up a repository.
2016-07-21 00:09:52,621 WARN [InitPing1 XXX ] fisheye BaseRepositoryScanner-handleSlurpException - Problem processing revisions from repo Website due to class com.cenqua.fisheye.rep.RepositoryClientException - com.atlassian.fisheye.dvcs.handler.DvcsProcessException: Error while communicating with VCS:
com.cenqua.fisheye.rep.RepositoryClientException: com.atlassian.fisheye.dvcs.handler.DvcsProcessException: Error while communicating with VCS:
..
..
Caused by: com.atlassian.fisheye.dvcs.handler.DvcsProcessException: Error while communicating with VCS:
..
..
Caused by: com.atlassian.utils.process.ProcessException: While executing: "C:\Program Files (x86)\Git\bin\git.exe show -m --no-abbrev --raw --stdin --no-renames --pretty=format:C:%H%nP:%P%nA:%aN%nE:%aE%nR:%cN%nF:%cE%nD:%at%nS:%s%nB:%b%n@@fe_body_end@@" in [C:\Atlassian\Data\fecru\var\cache\XXX\clone]
..
..
Caused by: com.atlassian.utils.process.ProcessException: com.atlassian.fisheye.dvcs.handler.DvcsProcessRuntimeException: com.atlassian.fisheye.dvcs.handler.DvcsProcessException: Error while communicating with VCS: E: unsupported filetype C:\Windows\TEMP/YlaBOb_MS-PubLicense.Rtf
fatal: unable to read files to diff
..
..
Caused by: com.atlassian.fisheye.dvcs.handler.DvcsProcessRuntimeException: com.atlassian.fisheye.dvcs.handler.DvcsProcessException: Error while communicating with VCS: E: unsupported filetype C:\Windows\TEMP/YlaBOb_MS-PubLicense.Rtf
fatal: unable to read files to diff
..
..
Caused by: com.atlassian.fisheye.dvcs.handler.DvcsProcessException: Error while communicating with VCS: E: unsupported filetype C:\Windows\TEMP/YlaBOb_MS-PubLicense.Rtf
fatal: unable to read files to diff
..
..
Caused by: com.atlassian.utils.process.ProcessException: While executing: "C:\Program Files (x86)\Git\bin\git.exe whatchanged --always --no-renames --no-abbrev --full-index -U0 --pretty=format: 4311be7fee58307931a10867cb9bdc71283f5dc9" in [C:\Atlassian\Data\fecru\var\cache\XXX\clone]
..
..
Caused by: com.atlassian.utils.process.ProcessException: Non-zero exit code: 128
..
..
Cause
- This applies to files in the repository that could be effectively be a binary file but Fisheye assumes they are a non-binary file and attempt to perform a diff.
You should see this error on the UI. As a sample of a Git repository:
Error while communicating with VCS: E: unsupported filetype C:\Windows\TEMP/YlaBOb_MS-PubLicense.Rtf fatal: unable to read files to diff
In this case, Fisheye wasn't able to differentiate that this file is a binary because of one of the Git executable files called astextplain which wasn't able to capture the extension as this executable script is case-sensitive.
A bug with Windows may also be the cause, which is documented at FE-6780 - Getting issue details... STATUS .
Resolution
Please follow the steps below. Note that this only applies for Git repositories:
- First, identify what is the file extension that Fisheye is throwing. In our case, the extension
.Rtf
Open up the
astextplain
script in your Git Directory (usually located in <Git Path>/usr/bin)Search for a particular extension (or you can add another
case
on the script to add more extensions that should be treated as binary files)As for the example above, the case-senstive
.Rtf
is not part of the list.*.rtf | *.RTF)
Adding another "or" using the pipe symbol " | " onto the list should include that extension as well. So, it should look something like this:
*.rtf | *.RTF | *.Rtf)
By doing this, you're telling Git to assume that any extension ending with
.rtf,
will be treated as a binary file and Fisheye will not attempt to perform a diff for any of these extensions..RTF
or.Rtf
Save the file and attempt to index again, Fisheye should pick up any extension with
.Rtf
as a binary file.