Importing data from another project

So here’s my current situation: I work for a tools and tech team that maintains a SonarQube server for a much larger team, and they recently changed their branching policy and this caused the trunk branch name to change from develop to master. Unfortunately, this change happened without our immediate knowledge, so the master branch went into use while the develop branch was still set as the main branch, so I can’t simply change the branch name to preserve continuity.

All of the historical data is stored in the main line under the develop branch tag, and we now need to switch the main branch to master. So for the pertinent information:

We are currently running SonarQube 7.6.
Is there any way to import the data from the sub-branch into the main line?
And will the data in the current main line be preserved when the branches are switched?


Hi Ryan,

Welcome to the community!

Unfortunately, you’re kinda stuck. This is the first part of what you’re looking for, and it hasn’t been implemented yet:

MMF-1335 - Allow a different, existing branch to be designated the Main Branch

What you can do is re-create history in a new project by:

  1. check out oldest date of interest & build
  2. analyze using sonar.projectDate
  3. increment date
  4. GOTO 1

Yes, this is tedious, painful, and error-prone. It’s also all I have for you.


Ok, sounds like short term pain for long-term gain. Thanks for your reply!


1 Like