Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

Is there a way to determine if file is added/deleted (RTC 3.0.1)?

I need to set different target in my incremental build based on what files are changed since last build. One of the requirement is that I need to rebuild everything if a file is deleted.  I know that generateChangeLog task gives me all the files that are changed; however it doesn't tell me if the file is added, deleted or modified. Does anyone have any suggestion on how to get this information (similar to the command "scm status..")? Can I implement a new task to do this using the RTC PlainJavaLib? 

0 votes



One answer

Permanent link
Hi Kevin,

I'm just looking through the GenerateChangeLogTask source and found an optional attribute "showFileChanges".  The javadoc reads,

<li><b>showFileChanges</b> - If <code>true</code>, file level changes will be
shown in the change log, <code>false</code> by default.</li>

Would it be easy for you to try that out?
Scott

0 votes

Comments

 Thanks Scott for your reply. With the "showFileChanges" flag on, I am able to see which file is changed, but it doesn't tell me what the change is (add, delete, or modify). Any suggestion? 


Here is what the change log looks like: 
---
Added Change Sets
  Test component TestRTC
    test [Apr 18, 2013 09:36 AM] Lou, Kevin
      /service/src/main/java/DeletedClass.java
      /service/src/main/java/ChangedClass.java
      /service/src/main/java//NewClass.java

We probably should indicate whether a file changes is an addition, removal, or change.  You'd still need to process added and removed change sets differently, e.g. if a change set that added a file is discarded, the file will be removed.
Please feel free to open an enhancement request for this.

In the interim, probably the simplest would be to check on disk (after the load) whether the file still exists.  


1 vote

 Was an enhancement request ever added for this ability? If so, has it been planned for a delivery? When we audit our software we are required to state if the file was added, modified or deleted. It shows up with the icon on the change explorer tab but when it is exported as a changelog that information is not exported. I am running 4.0.6 and I am hoping to upgrade later this year. This functionality is important to our process and would be a decision maker for when and what version we upgrade to.

Your answer

Register or log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 12,025
× 562
× 25

Question asked: Apr 17 '13, 9:19 a.m.

Question was seen: 5,842 times

Last updated: Mar 16 '15, 2:59 p.m.

Confirmation Cancel Confirm