It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Crucible Not Allowing Diffs For non text/plain Mime Types for .SQL files

AJ Mieskolainen Dec 05, 2018

So, it appears that SMSS is likely giving some of our .sql files a binary mime type.

This causes problems when adding .sql files to code reviews, as the code reviewer cannot use Crucible to see the changes. The code reviewer is forced to use source control to see the differences.

Updating all of the affected .sql files is not an option.

Is it possible to configure Crucible to treat .sql files as text regardless of mime-type?

1 answer

1 accepted

0 votes
Answer accepted
Ben Stuart Atlassian Team Feb 13, 2019

Hey AJ, this could be caused for a few different reasons. Do the SQL files show as loading forever or are they displayed as binary? 

It could be a performance problem:

We do allow for diffs between SQL files but there are some improvements on the performance of this in later versions. Ususally slow diff load are related to the following two bugs/ improvement requests:


The Store Diff Info would probably speed up showing diff's. You should be aware of the ramifications of setting this value as stated in the Documentation.

The issue could also be due to encloding:

Files that you are unable to view/diff could be encoded with: UNICODE

Files that you can view/diff may be encoded with: ASCII

Here is the only possible way I see to fixed this issue with in Fisheye. I am not sure this will work or fits your situation. I suggest testing this in a test environment with a test repo: Configuring a Different Charset in Fisheye/Crucible

Other than that there does not seem to be away with in Fisheye:
Fisheye uses the following file to handle file extensions: <FishEye/Crucible installation directory>/raw-mime.types
The following line within that file is where we map the extensions to be a text file:

text/plain   asc txt java jsp asp cs idl cpp cxx c h  pl pod py sh awk sed sql jspf tag 

SLQ is already consider to be a text file. So it really comes down to encoding I believe.

As you probably already know you can open a file in notepad and then do "Save As" and change the encoding.

I have been looking for a way to bulk convert the encode and I did fine something to at least identify the encoding. Also I am not sure what types of Repos we are dealing with. If you have git installed you can use the file command to list the encoding of each file.

Get encoding of a file in Windows - Stack Overflow

I found the following on how to bulk convert: How to bulk convert unicode file names to Ascii file names windows CMD or powershell - Stack Overflow

Having said all this if all your users change there editor to use ASCII by default when saving the file. Each time edit a file Checkout and Commit, that files head version will be fixed and viewable in Fisheye.

I hope this helps! 

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Published in Next-gen

Introducing subtasks for breaking down work in next-gen projects

Teams break work down in order to help simplify complex tasks. This is often done iteratively, with tasks being broken down into smaller tasks and so on until the work is accurately captured in well-...

1,060 views 13 15
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you