Local History revision purge behavior with combined count and age limits
0 reputation · 17 Apr 2023, 23:54 UTC
0 reputation · 17 Apr 2023, 23:54 UTC
When using Delphi's Local History feature, developers can configure both a maximum number of revisions to retain and a maximum age for those revisions. The documentation describes each limit independently but does not specify how the IDE resolves conflicts when a revision satisfies one limit but not the other.
Understanding the exact purge logic is important because changing the limits after revisions have been created may lead to unexpected removal of versions that a user expects to keep.
When both limits are active, does a revision need to satisfy both criteria to be retained, or is it enough to meet either one? If a revision is younger than the age limit but exceeds the count limit, which revision is removed first? Does the IDE apply the age filter before the count filter, or vice versa?
A revision must satisfy **both** the age limit and the count limit to be retained; meeting only one criterion is insufficient.
When both limits are active, Delphi first removes any revisions older than the specified age. If the remaining revisions still exceed the count limit, it then deletes the oldest revisions until the count limit is satisfied.
Note: This two‑step order has been verified in Delphi XE2 and later; earlier versions may use a different sequence, so verify on the specific IDE release you are using.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.