"Negative line counts for Launchpad"



The code analysis for Launchpad gives negative line counts for SQL and HTML:

https://www.ohloh.net/p/launchpad/analyses/latest

These negative values were present in the original analysis and appear to have grown larger since then:

https://www.ohloh.net/p/launchpad/analyses/741055

For example, the HTML line count has gone from -4,430 (2nd Sep) to -4,689 (1st Nov).

It is a Bazaar enlistment if that makes a difference.

Avatar

James Henstridge

over 3 years ago
 

Hi James,

I highly suspect that this is caused by a design flaw in Ohloh's source control importer.

It's the same problem discussed in this post. That post should help explain what's going wrong.

It affects all source control systems that arrange their commits as a DAG. When parallel changes occur on more than one branch and then are merged back into the main line, Ohloh's line counts will not balance.

For example, if you add a file on the main line, then remove it on two different branches, and then merge both of those branches back into the main line, you can end up with a history log that shows two file deletions but only one file addition. This breaks Ohloh's line counts.

It's purely Ohloh's fault, and it's an artifact of trying to adapt the analysis tools we originally created for CVS and Subversion (which have simple, linear commit histories) and trying to apply these tools to SCMs that use non-linear commit graphs.

I do hope we'll fix it soon. For now, I think we're stuck with this sorts of issues whenever repositories have lots of branching and merging. :-(

Avatar

Robin Luckey

over 3 years ago
 



 

Creative Commons License Copyright © 2013 Black Duck Software, Inc. and its contributors, Some Rights Reserved. Unless otherwise marked, this work is licensed under a Creative Commons Attribution 3.0 Unported License . Ohloh ® and the Ohloh logo are trademarks of Black Duck Software, Inc. in the United States and/or other jurisdictions. All other trademarks are the property of their respective holders.