1

I would like to find the number of lines of code which got added/modified/deleted between two releases. I have a label which is applied at the end of release.

There is ClearCase Report Viewer which shows list of elements which got modified between two labels. But I am looking for number of files which got changed.

Any solution to this?

vkreddy
  • 181
  • 6
  • 18
  • Number of files or number of lines? – VonC Sep 20 '16 at 09:50
  • I am able to see the change list between two labels using Cleacase Report Builder. Now, How can I find the number of lines which are added/modified/deleted between two Labels? Is there any way to accomplish this? – vkreddy Sep 20 '16 at 09:52
  • Related [question](http://stackoverflow.com/q/4334955/23118). – hlovdal Sep 21 '16 at 21:43
  • Notice that regarding *modified* lines, what you ask for is [impossible](http://stackoverflow.com/a/38464406/23118). – hlovdal Sep 21 '16 at 21:45

1 Answers1

1

The easiest way (without involving any commercial third-party tool) is to use linux commands diff and diffstat and apply it to two dynamic views, each one with their own config spec selecting a label:

element * LABELx
element * /main/LATEST

That way, you can get a full report of the differences between the two diffstat reports.
See "Difference between two versions in ClearCase dynamic view" for a concrete example.

diff -u /view/VIEW1/SOMEVOB/some/dir /view/VIEW2/SOMEVOB/some/dir | diffstat

Note: this is valid for Windows as well, since any Git distribution includes diff.exe, and diffstat is available for Windows.

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250