Binary files missing from crucible.py patch file for Perforce

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. 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.

*Except Fisheye and Crucible

Summary

Problem

When executing the crucible.py script to create a pre-commit patch file for review, specific file(s) are not included in the resulting patch file.

Diagnosis

To diagnose this issue, you will need to enable debug mode for crucible.py:

1 crucible.py -d

In your debug output, you will see the following:

1 2 stderr= DEBUG:root:Omitting binary file

Cause

For Perforce, binaries are just one type of files that are excluded when generating patches using the crucible.py script. These file types currently are:

  • binary

  • xbinary

  • ubinary

  • uxbinary

  • tempobj

  • ctempobj

  • xtempobj

  • symlink

The omission of these files via the crucible.py script is by design.

Solution

Resolution

According to the Perforce User's Guide:

Perforce first determines whether the file is a regular file or a symbolic link, and then examines the first part of the file to determine whether it's text or binary. If any nontext characters are found, the file is assumed to be binary; otherwise, the file is assumed to be text.

If you believe that your file was marked as binary mistakenly, you are able to change the file type by specifying the following option in Perforce:

1 -t_{{filetype_}}
Updated on April 16, 2025

Still need help?

The Atlassian Community is here for you.