cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Stay updated on what is happening on the PTC Community by subscribing to PTC Community Announcements. X

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

ptc-4709987
3-Newcomer

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

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.

ACCEPTED SOLUTION

Accepted Solutions
tketz
12-Amethyst
(To:ptc-4709987)

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.

View solution in original post

2 REPLIES 2
tketz
12-Amethyst
(To:ptc-4709987)

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.

khoppe
15-Moonstone
(To:tketz)

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

Announcements


Top Tags