Fisheye renders binary file in SVN repository as text

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

プラットフォームについて: Server および Data Center のみ。この記事は、Server および Data Center プラットフォームのアトラシアン製品にのみ適用されます。

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Fisheye および Crucible は除く

問題

When viewing a binary file stored in an SVN repository, the Source or Diff windows will show an ASCII rendering of the file.

診断

環境

  • This only happens with SVN repositories

Diagnostic Steps

  • Obtain a copy of the original file which is not showing properly.
  • Test in a local repository.

原因

Per SVN Red Book: Automatic Properties if the SVN properties are not manually set on a file, SVN will try to auto-detect the file type.  The auto-detection algorithm will sometimes fail, causing SVN to default set the property svn:mimetype type to blank, and assume the file is text.

ソリューション

Manually set the MIME type for the file.

  • For a list of all MIME types, please refer to The Complete List of MIME Types

    svn propset svn:mimetype MIME_TYPE FILE_NAME
  • Replace MIME_TYPE with the official type (e.g. application/pdf) and FILE_NAME with the name of the file in the repository

最終更新日 2018 年 7 月 31 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.