crucible.py returns Failed to get a patch. Please make sure to call the script from an SCM directory with local changes, or pipe in some input

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.

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

Problem

When a user is trying to create a review using crucible.py as mentioned in Creating reviews from the command line in P4 workspace, it throws an error as

..
..
DEBUG:root:Checking <class '__main__.P4Source'>.is_active
DEBUG:root:Trying to execute (['p4'],)
Failed to get a patch. Please make sure to call the script from an SCM directory with local changes, or pipe in some input.

Cause

Script is trying to execute the p4 executables but not able to pipe the output from subprocess

Workaround

  1. It may be an issue as explained in  CRUC-8206 - Getting issue details... STATUS . If you are running the script in a workspace containing a P4 repo is a symbolic link, try the workaround mentioned in the bug.
  2. Please verify the p4 is in environment variable PATH. We have seen similar issues when the p4 is made available with alias.


Last modified on Nov 2, 2018

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.