fixed the LOC-by-file function to use the full path as a node name
This commit is contained in:
parent
f13d9f2c2b
commit
acbb46dc3d
@ -1032,7 +1032,7 @@ class SubversionModel extends Model
|
|||||||
$stack = array();
|
$stack = array();
|
||||||
$cloc = new stdClass();
|
$cloc = new stdClass();
|
||||||
|
|
||||||
$cloc->name = basename($path);
|
$cloc->name = $path;
|
||||||
if ($cloc->name == '') $cloc->name = '/';
|
if ($cloc->name == '') $cloc->name = '/';
|
||||||
$cloc->children = array();
|
$cloc->children = array();
|
||||||
|
|
||||||
@ -1082,7 +1082,8 @@ class SubversionModel extends Model
|
|||||||
if ($value['type'] == 'file')
|
if ($value['type'] == 'file')
|
||||||
{
|
{
|
||||||
$obj = new stdClass();
|
$obj = new stdClass();
|
||||||
$obj->name = $key;
|
//$obj->name = $key;
|
||||||
|
$obj->name = $full_path;
|
||||||
|
|
||||||
$text = @svn_cat ("{$orgurl}/{$key}{$trailer}", $rev);
|
$text = @svn_cat ("{$orgurl}/{$key}{$trailer}", $rev);
|
||||||
if ($text === FALSE) $obj->size = 0;
|
if ($text === FALSE) $obj->size = 0;
|
||||||
@ -1102,7 +1103,13 @@ class SubversionModel extends Model
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
$obj = new stdClass();
|
$obj = new stdClass();
|
||||||
$obj->name = $key;
|
// using the base name only caused some wrong linkages
|
||||||
|
// in the graph when the base name coflicted with
|
||||||
|
// other same base name in a different directory.
|
||||||
|
// let's use a full path. it's anyway clearer.
|
||||||
|
//$obj->name = $key;
|
||||||
|
$obj->name = $full_path;
|
||||||
|
|
||||||
$obj->children = array();
|
$obj->children = array();
|
||||||
array_push ($current_cloc->children, $obj);
|
array_push ($current_cloc->children, $obj);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user