Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Crucible pre-commit query

rahuldanwade
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 17, 2015

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

0 votes
Answer accepted
Piotr Swiecicki
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 18, 2015

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 

rahuldanwade
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 19, 2015

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!!!

Piotr Swiecicki
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 23, 2015

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,

0 votes
rahuldanwade
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 17, 2015

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
TAGS
AUG Leaders

Atlassian Community Events