Skip to main content
1-Visitor
February 18, 2014
Solved

How to find the difference in lines of source code between 2 project checkpoints?

  • February 18, 2014
  • 1 reply
  • 1829 views

1. I have a project Test\Test.pj and assuming it is checkpointed 10 times.

2. I know that there is a facility to view the differences between 2 checkpoints.

3. But, is there a facility to also view the lines of source code that is modified during these 2 checkpoints and count them?

Please suggest the best possibility in this tool.

    Best answer by tketz

    Hi Vinayak,

    with the CLI "si calculateprojectmetrics -P Test\Test.pj --projectRevision="checkpoint1"

    and "si calculateprojectmetrics -P Test\Test.pj --projectRevision="checkpoint2"

    you can calculate the metrics.

    After that you can use "si calculateprojectmetrics -P Test\Test.pj --projectRevision="checkpoint1" and "si calculateprojectmetrics -P Test\Test.pj --projectRevision="checkpoint2" to have a look at the calculated date and see the difference.

    This is also possible with the GUI:

    Select Project->Views->View Project History

    Select a Checkpoint and right Click->Customize (choose calculate Metrics and View Metrics).

    Right Click again at the first Checkpoint an choose Calculate Metrics and then View Metrics. DO this again for the second Checkpoint.

    The best solution is to make a little script with the CLI Command as a custom command in the GUI.

    View the differences between your Checkpoints is not so easy. You can make a script using the si mod command (view project difference) and si rlog / si diff to show the differences or modifications.

    1 reply

    tketz1-VisitorAnswer
    1-Visitor
    March 21, 2014

    Hi Vinayak,

    with the CLI "si calculateprojectmetrics -P Test\Test.pj --projectRevision="checkpoint1"

    and "si calculateprojectmetrics -P Test\Test.pj --projectRevision="checkpoint2"

    you can calculate the metrics.

    After that you can use "si calculateprojectmetrics -P Test\Test.pj --projectRevision="checkpoint1" and "si calculateprojectmetrics -P Test\Test.pj --projectRevision="checkpoint2" to have a look at the calculated date and see the difference.

    This is also possible with the GUI:

    Select Project->Views->View Project History

    Select a Checkpoint and right Click->Customize (choose calculate Metrics and View Metrics).

    Right Click again at the first Checkpoint an choose Calculate Metrics and then View Metrics. DO this again for the second Checkpoint.

    The best solution is to make a little script with the CLI Command as a custom command in the GUI.

    View the differences between your Checkpoints is not so easy. You can make a script using the si mod command (view project difference) and si rlog / si diff to show the differences or modifications.

    15-Moonstone
    September 26, 2016

    Trying to run the suggested solution I get the following error:

    CalculatingProjectMetrics.jpg

    In our installation I haven't found such a manuel.

    How to solve this problem?

    Best regards,

    Klaus