It appears that on Windows, the csv_as_enclosure_json.py script will run but returns 0.0 weight for all the paths because of a mismatch between the paths generated by hg log: Xian/ImageViewer/ClearCanvas.ImageViewer.xml
and the paths returned by Cloc: .\Xian\ImageViewer\ClearCanvas.ImageViewer.xml
In my clone I've modified parse_structural_element and parse_element_weight to use os.path.normpath on the names, e.g. name = os.path.normpath(csv_row[0])
but then StructuralElement.parts() splits the paths using / which means nothing gets split, so I modified that to use os.path.sep instead of '/' and that seems to do the job.
Hi,
It appears that on Windows, the csv_as_enclosure_json.py script will run but returns 0.0 weight for all the paths because of a mismatch between the paths generated by hg log:
Xian/ImageViewer/ClearCanvas.ImageViewer.xml
and the paths returned by Cloc:
.\Xian\ImageViewer\ClearCanvas.ImageViewer.xml
In my clone I've modified parse_structural_element and parse_element_weight to use os.path.normpath on the names, e.g.
name = os.path.normpath(csv_row[0])
but then StructuralElement.parts() splits the paths using / which means nothing gets split, so I modified that to use os.path.sep instead of '/' and that seems to do the job.