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?
|
One answer
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 Comments
Kevin Lou
commented Apr 18 '13, 9:39 a.m.
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
1
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. 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
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.