Bug 24067 - [PATCH] <propertyfile> should not touch a file it will not change semantically
Summary: [PATCH] <propertyfile> should not touch a file it will not change semantically
Status: NEW
Alias: None
Product: Ant
Classification: Unclassified
Component: Optional Tasks (show other bugs)
Version: 1.6.0
Hardware: All All
: P3 enhancement with 2 votes (vote)
Target Milestone: ---
Assignee: Ant Notifications List
Keywords: PatchAvailable
Depends on:
Reported: 2003-10-23 16:49 UTC by Jesse Glick
Modified: 2009-07-31 03:45 UTC (History)
0 users

Suggested patch (5.84 KB, patch)
2003-10-23 16:50 UTC, Jesse Glick
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2003-10-23 16:49:48 UTC
If after running <propertyfile> you have made no actual changes to the
properties contained in it, it should avoid rewriting the file: changing the
timestamp might cause other tasks to think they are out-of-date etc. Important
in a big incremental build where the .properties file is used as an upstream

There are three cases:

1. Property file did not exist before. Whether or not any keys are being added,
create the .properties file, and log a message (INFO).

2. Existed before, and we are making changes. Rewrite, log a message (INFO).

3. Existed before, and we are not making any changes. Just log a message (VERBOSE).

Patch includes added unit test.
Comment 1 Jesse Glick 2003-10-23 16:50:55 UTC
Created attachment 8695 [details]
Suggested patch