Crucible pre-commit query

If I create patch file for one of a branch on my local machine and  them upload to crucible via pre-commit  how crucible make it sure that the patch file goes to the correct branch?

2 answers

1 accepted

This widget could not be displayed.

As explained in https://confluence.atlassian.com/display/CRUCIBLE/Creating+patch+files+for+pre-commit+reviews:

Crucible will analyse all the paths in the patch, find the branches containing all those paths, then anchor the patch to the trunk or the branch with the most recent commit activity.

Feel free to raise a improvement suggestion in https://jira.atlassian.com/browse/CRUC project to be able to specify the branch, at the moment it is not possible I am afraid.

Kind regards,
Piotr 

Hi Piotr, I am trying to create a pre-commit review from crucible using the attached patch file. But This is not getting anchored to "Demo" repository. This repository points to core-framework and the patch file is also created inside that directory only. Now we create pre-commit hook for code changes that have not yet been committed to the SCM. and like you said "Crucible will analyse all the paths in the patch, find the branches containing all those paths, then anchor the patch to the trunk or the branch with the most recent commit activity." Here I am little confused about committing to SCM or in other way can I commit to local repo and create patch file then attach it to review or I should not create to local repo whatever changes I do in my local repo code create a patch from there and attach it to crucible review. Could you please help on that!!! Thanks in advance!!!

Hi Rahul, You mentioned an attached patch file but I can't see any attached file here. If you believe the patch is anchored to wrong repository than expected, please try picking up correct repository when anchoring the patch, you should be able to specify which repository the patch should be anchored to. What SCM type do you use by the way? You mention committing to local repository so I am guessing this is git or mercurial, is that correct? Regarding your last question, it shouldn't really matter whether you committed changes to your local repository or not. Crucible should manage to anchor the patches correctly as long as the "from" changeset of your patch is already known to Crucible and was indexed correctly. Hope that helps,

This widget could not be displayed.

I can add the Git repo(drop down option available) but doesn't seem to be a way to select the branch to use

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted yesterday in Jira

What modern development practices are at the heart of how your team delivers software?

Hey Community mates! Claire here from the Software Product Marketing team. We all know software development changes rapidly, and it's often tough to keep up. But from our research, we've found the h...

78 views 0 1
Join discussion

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you