What is the difference between locateAncestors and determineAncestorsInHistory?
My RTC version is 6.0.3.
RTC's plain Java API has the interface : IConfiguration,
and IConfiguration has two methods : locateAncestors and determineAncestorsInHistory which both reutrn List<IAncestorReport>.
I have an IChangeSet as input, and I can get the IChange and IVersionableHandle by the IChangeSet.
And I have an IConfiguration, but which method should I use to get List<IAncestorReport>?
In which situation, should I choose locateAncestors?
And under which condition, should I use determineAncestorsInHistory?
Or just the two methods behavior the same way and reach the same goal?
|
One answer
IConfiguration.locateAncestors will not return an IAncestorReport for a file that does not exist in the configuration. Ex: a file used to exist, but has since been deleted.
However, IConfiguration.determineAncestorsInHistory will attempt to find the 'last known' path for that deleted file and return an IAncestorReport that describes where it was before it was deleted. Note: This is a best effort attempt as It is not guaranteed to find a 'last known path'. (this is because the algorithm inspects the last 2048 change sets to see if they contain the file deletion, but will not traverse deeper into history to attempt to find a file that may possibly have never existed in that configuration).
|
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.