Calculate Lines of Code Metric For SVN Branches
The value for the LOC (Lines of Code) metric is zero (0) for an SVN repository even though "Activity" shows current subversion commits.
Fisheye only counts lines of code checked into the trunk.
In order for Fisheye to start counting the branches LOC, the Symbolic Links will need to be customized. This can be done under
Administration > Repository Settings > Repositories, click on the repository name
SCM Details > SVN Symbolic Rules. The screen has a placeholder for
Branches and for
Tags. Select "Custom" from the drop-down and click "Add" (the right-most link creates a new row) to have another line for
Trunk. Populate it with the pattern of the branch to be included in the LOC metric. De-select the option "Use Built-in Symbolic Rules" before pressing "Save". For more details please refer to the following pages:
The following example shows a set up including a branch. Note that all branches could be included in the LOC count if the "a_branch_to_count_lines/" part is removed:
|タイプ||正規表現||名前||Logical Path Prefix|
If the trunk and the branch have the exact same code, then the LOC count will be doubled. Separation of trunk LOC and branch LOC can be achieved by keeping two different repositories: one that uses trunk as its official trunk for LOC, and another that ignores trunk and uses the branch definition mapped at the trunk line.