-
Notifications
You must be signed in to change notification settings - Fork 1
ci-merge : Adding option to bypass topic branch in case of merge conflicts and adding a log-parser #6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
ci-merge
Outdated
| echo "Merging topic branches..." | ||
|
|
||
| mkdir qcom-next | ||
| printf "%*s %*s\n" 10 "Name" 20 "SHA1" > qcom-next/topic_SHA1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's not redirect o/p to hardcoded file from within code. You can print info here, and then pass to some script to generate o/p in a preferred format that goes into topic_SHA1 file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated
ci-merge
Outdated
| if echo "$MERGE_OUTPUT" | grep -q "Already up to date." ; then | ||
| echo "Nothing to merge: Already up to date." | ||
| else | ||
| printf "%-20s %*s\n" "$REMOTE_NAME" 45 "$branch_tip" >> qcom-next/topic_SHA1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated
ci-merge
Outdated
|
|
||
| git merge -q --no-ff --no-edit -m "Merge remote-tracking branch $REMOTE_NAME into $INTEG_BRANCH" $MERGER | ||
| branch_tip=$(git rev-parse $MERGER) | ||
| MERGE_OUTPUT=$(git merge --no-ff --no-edit -m "Merge remote-tracking branch $REMOTE_NAME into $INTEG_BRANCH" $MERGER 2>&1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is 2>&1 necessary ? you can work with all err + success output log ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated
fd80905 to
9b5c743
Compare
Introducing a option -p, which will bypass a conflicting branch in case of non-interactive merge. Branch would be reset with git merge --abort and next branch would be merged, instead of exiting. Signed-off-by: Salendarsingh Gaud <[email protected]>
Script to parse the merge logs, this will search for "Merge sucessful: " string and capture branch name and SHA in a text file. Signed-off-by: Salendarsingh Gaud <[email protected]>
Calculate and print number of commits present in each branch that is merged into baseline. Signed-off-by: Salendarsingh Gaud <[email protected]>
Parse number of commits from log file and add to topic_SHA1 file Signed-off-by: Salendarsingh Gaud <[email protected]>
This is intended to add functionality in automerge to capture topic branch SHA that are getting merged into the baseline. This will generate a file qcom-next/topic_SHA1 which will have topic brancg name and the SHA that is merged in baseline while running automerge tool.