[Branch Plugin] Feature Request: Copy/Duplicate an Existing Branch

16 views
Skip to first unread message

kri...@gmail.com

unread,
Apr 23, 2018, 4:59:13 PM4/23/18
to SonarQube
Hello,

I would like to suggest a feature to improve the functionality of the Branch Plugin.

It would be nice to have an option to Copy or Duplicate an existing branch of a project. An example use case for this would be:

Work is being done on the project's master (main) branch. As it comes time to release the product (let's say version 2.0), a long-lived branch wants to be created to maintain the 2.0 release. This way the master (main) branch can continue with development of the next release and there is a separate branch for any potential 2.0 maintenance/bug-fix changes.

Currently, the only way to create that "release-2.0" branch is to re-perform an entire analysis on the project.

My suggestion is to add the ability to copy an existing branch (the master branch in the use case) to a new branch (the relase-2.0 branch in the use case). My expected result of the copy operation would be that there is a new branch with the same issues, measures, etc. as the source branch.

I can understand if there would need to be restrictions. Like, for example, if both the source and destination branches would both need to be long-lived branches.

Thank you

nicolas...@sonarsource.com

unread,
Apr 24, 2018, 4:19:45 AM4/24/18
to SonarQube
Hi,

Thanks for the idea sharing. Quick alignment though: given the fact that any analysis on a long-lived branch is a full analysis, are we aligned that the functionality you're asking for here is basically just saving you from doing one analysis ?

That would be the analysis that would bootstrap the long-lived branch in SonarQube (per documentation) , and then all changes on that branch would still have to be fully analysed.

If so then (personal feeling here) it may seem quite a feature to implement, for the little value of just avoiding one analysis (analysing a project/branch should be a non-event with CI automation).

Best regards,
Nicolas

Julien Lancelot

unread,
Apr 24, 2018, 5:50:04 AM4/24/18
to nicolas...@sonarsource.com, SonarQube
And please do not cross post on StackOverFlow and on this mailing list : https://stackoverflow.com/questions/49988361/copy-duplicate-sonarqube-branch.

--
You received this message because you are subscribed to the Google Groups "SonarQube" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonarqube+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonarqube/b7e91e4e-3b7e-445a-9c02-b89f1fa1e7e2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
Julien Lancelot | SonarSource

kri...@gmail.com

unread,
Apr 24, 2018, 8:26:09 AM4/24/18
to SonarQube
Nicolas,

Yes, that would be all that I'm asking; to avoid having to do one more full analysis to create another long-lived branch. I understand it may not seem like much, but it could save some time on larger projects (millions or tens of millions of lines of code), especially on C/C++ projects where you have to perform a full build with the build-wrapper before performing the analysis.

So yes, this would be more of a "nice to have" feature, not something critical.

Julien,

I apologize, I thought I would post on StackOverflow to confirm the feature doesn't exist; as I thought that was the "How do I do something" forum. Then post here to request the feature, as this is the bug report and feature request forum.

Thank you
Reply all
Reply to author
Forward
0 new messages