Review - SVN SCM Plugin - AnnotationHandler.java/line48 - Should really merge information be added to BlameLine?

39 views
Skip to first unread message

Andreas

unread,
Sep 15, 2015, 2:28:14 AM9/15/15
to SonarQube
Hello,

I'm not sure if this is a bug, but for me it looks strange that only merge information are added to the new BlameLine instance?
I guess that this code is responsible that I didn't receive any author information for normally - means, not merged - commited/changed files.

Br,

Andreas

Julien HENRY

unread,
Sep 15, 2015, 3:22:13 AM9/15/15
to SonarQube
Hi Andreas,

We have integration tests that report that it is working fine. The SVNKit API is not very clear but it seems that when we enable includeMergedRevision the mergedAuthor is always set even if no merge occured in the file history. Could you please report:
  - version of your SVN server (and check that repo is correctly migrated)
  - version of your SVN workspace
  - version of the SonarQube SVN plugin

Thanks

Julien

Andreas

unread,
Sep 16, 2015, 2:46:11 AM9/16/15
to SonarQube
Hello Julien,

to be honest I'm not sure what is causing the problem; I only could tell that I'm missing the authors in SQ.
Regarding your request information.

SVN Server: 1.6.12 with FSFS Format 4 (so the repo is migrated, at least to 1.6 ;-)
SVN Client/Working Copy: 1.8.13
SVN SQ plugin 1.2 (together with SQ 5.1.2)

Best regards,

Andreas

Julien HENRY

unread,
Sep 16, 2015, 8:46:24 AM9/16/15
to SonarQube
Can you try to download SVNKit standalone: http://www.svnkit.com/org.tmatesoft.svn_1.8.10.standalone.zip

Then run svn annotate -g <a file> and check if you get authors?

Thanks

Andreas

unread,
Sep 16, 2015, 9:00:36 AM9/16/15
to SonarQube
Hmmm... if I run jsvn annotate -g <file> I see revisions and users; so that seems to work. Now I really wonder why I didn't see any author information in SQ ;-(

Thanks,

Andreas

Julien HENRY

unread,
Sep 16, 2015, 10:08:31 AM9/16/15
to SonarQube
Can you confirm you are starting from scratch for your tests? There is an optimization: when a file is not modified compared to last analysis on the server we don't execute the blame on it. It means if in the past you got a problem and your SQ DB was filled with empty authors for a file, then even if you updated the plugin to a fixed version we will not execute/update blame information until the file content is changed.

To be sure, please try to analyze your project in a branch (-Dsonar.branch=foo) so that all files are blamed.

If you still have the issue would you be able to checkout and build this branch of the plugin, then test it:

I made a "blind" attempt to fix your issue based on the code of SVNKit jsvn.

++

Julien

Andreas

unread,
Sep 17, 2015, 4:12:13 AM9/17/15
to SonarQube
Hi Julien,

I've started a new test project and everything is working as expected; so I have to figure out, why it doesn't work for my multi MLoC production project - I fear this will need some time. If I gain new insights I will post them here.
Many thanks for your assistance!

Best regards,

Andreas
Reply all
Reply to author
Forward
0 new messages