Pre-Commit Workflow for Crucible & Perforce

Thomas Cross July 17, 2012

Hi All-

I'm hoping you Crucible experts can share your experiences with me... My Development team has done some light evaluations of the various code review tools, and Crucible is the one we like best.

We do a very large majority of our code reviews in a pre-commit mode. We're a Perforce shop with developers using both IDEA and Eclipse.

The only thing that I can't seem to get my brain around is how Eclipse users initiate pre-commit reviews. With the Eclipse Plug-In no longer supported, it seems as though we have to ask our developers to run some sort of obscure script to generate a patch file, and then specify that file as part of the "Create Review" process?

Our IDEA developers apparently can still initiate a code review using the plug-in -- although with the Eclipse plug-in no longer supported, I don't feel like I can rely on that either.

I'm happy to use the Crucible site to actually capture the review feedback -- but I'm very concerned that our Developers won't embrace a tool that is cumbersome when it comes to actually initiating the reviews themselves. Something that plugged into Perforce, or even a standalone bridge that streamlined the review creation process, seems like a big missing piece before I can recommend this software for purchase.

So that said -- what am I missing?

2 answers

1 accepted

6 votes
Answer accepted
Gabor Maghera August 9, 2012

My opinion is that this should be part of the core features Crucible offers, by allowing for reviewing of shelved changes in Perforce. Doing a review before committing to a change makes more sense than doing it after the fact.

0 votes
Felipe Kraemer
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 9, 2012

Hi Tom,

As far as I know, once you have a Perforce plugin for Eclipse, such as P4Eclipse, and an Eclipse project shared using this plugin, you can right-click e.g. on the Eclipse project name and go to Team > Create Patch... This will open the Create Patch Wizard, which will list all the modified files in that project and allow you to select an export location. You'll need to set the location of your P4 executable file as well.

If you don't have an Eclipse plugin, according to this document, you can generate a patch for changed files using the command line.

Then in Crucible all you need to do is to create a new review and upload the pre-commit patch file.

Please let us know if this helps.

Andrew DeFaria July 10, 2014

My eclipse (Luna 4.4.0) and P4Eclipse (2013.1.788968) does not have a Create Patch Wizard on the Team menu. It has an Apply Patch but I suspect that's to apply a patch to the current file, not export a patch file...

Besides this does not address people not using Eclipse or IDEA.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events