Getting history for all the files in Repository
Is it possible to get history for all the files in a particular component of a Project area? For Ex if file PropertyReader.java has been modified by Developer A most recently.. Need to get the list like PropertyReader.java Developer A I was able to get the history using scm
scm show history -r $URL -u $userId -P $pwd -w $ws --component icdp_core_as /source/common/Adapters/com/bac/icdp/consumer/common
/PropertyReader.java
(2097) ----$ Developer A "Code changes for XML..." 03-Mar-2015 04:09 PM
But i need run this for each file to get the history of all the files..
So java api can simplify this task
scm show history -r $URL -u $userId -P $pwd -w $ws --component icdp_core_as /source/common/Adapters/com/bac/icdp/consumer/common
/PropertyReader.java
(2097) ----$ Developer A "Code changes for XML..." 03-Mar-2015 04:09 PM
But i need run this for each file to get the history of all the files..
So java api can simplify this task
One answer
In general, calling
scm show history --maximum 1 ...
would provide you with the information you want, but it involves an invocation per file, which might be time consuming.
If you're trying to generate something like a change log, then comparing against a snapshot (or baseline) would probably be more efficient to use
scm compare
, as that will show you all of the differences, which you can then use to prune down to the most recent change set for each modified item.
If you want to create this list often, you could generate the history once and cache the value per file, along with the file's state id (use the
--json
output argument to get that kind of information). In future, when you want to regenerate the history, you could find the current state id of each file in the workspace (using
scm list remotefiles
) and only query for the history of changed files.
Comments
Geoffrey Clemm
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER Mar 08 '15, 5:13 p.m.Nayeem M
Mar 09 '15, 5:23 p.m.