How to create a Log of changes done in code?
Hello,
Inspired by the book "Code as a Crime scene", we would like to implement a feature to see "hot spots" of files that get edited often or in combination with other files. For that, a log file is necessary. The open source tool "code maat" itself uses different log formats for that, e.g. git log in the form
git log --pretty=format:'[%h] %aN %ad %s' --date=short --numstat --after=YYYY-MM-DD
So that you create a log of all commits from a certain time on, with the edited files, authors and dates.
Is there any way possible, to extract similar change logs with the JAVA API? The data I am looking for should be somehow saved in the change sets, right? Without a log like this, a historical meta data analysis is hardly possible.
Thanks!
One answer
I would suggest to look into the Jazz SCM Command Line before trying the API.
See https://jazz.net/library/article/620 and https://jazz.net/help-dev/clm/index.jsp?topic=%2Fcom.ibm.team.scm.doc%2Ftopics%2Fc_scm_cli.html .
I am reasonably sure that the RTC Java APIs and code from the RTC Client SDK would allow this. So you basically would have to look at the history of a stream - the histories of components in that stream beginning with the latest sate and iterate the change sets and their content and log that. I have talked to a partner that did something similar using the API and hooked up to the RTC SCM Deliver follow up action to be able to gather information asap.
Nevertheless, I would suggest to try using the SCM command line, because the API is not documented. I provided you wit the starting points in my blog rsjazz already in other questions you asked. You can search the blog also for SCM to find all blogs that have SCM API.