It's all about the answers!

Ask a question

How to find out programatically which files are changed?


Vinod Kumar (9612010) | asked Nov 07 '08, 4:41 a.m.
JAZZ DEVELOPER
How to find out programatically which files have been changed in a change set?

3 answers



permanent link
Dmitry Karasik (1.8k11) | answered Nov 07 '08, 4:41 a.m.
JAZZ DEVELOPER
How to find out programatically which files have been changed in a
change set?

If you have the IChangeSet you can do:

List<IChange> changes = changeset.changes();
for (IChange change : changes) {
change.item() //this is the changed file/folder
}


- Dmitry

permanent link
Deepak Azad (211) | answered Nov 30 '08, 12:55 a.m.
JAZZ DEVELOPER
ChangeSetDTO.getChanges() is supposed to work in a similar fashion and return List<ChangeDTO>, but it always returns null. On the other hand IChangeset.changes() works beautifully. Is this a know issue or could I be making a mistake?

permanent link
Deepak Azad (211) | answered Nov 30 '08, 11:11 a.m.
JAZZ DEVELOPER
I got it working. Earlier I was using IScmRestService.getChangeSet(), this does not work and is a known issue ( Refer workitem 40937). After using IFilesystemRestService.getChangeSet() I am able to get the changes from ChangeDTO object.

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.