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

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?

1

0 votes



One answer

Permanent link
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).

0 votes

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
× 10,937
× 169

Question asked: Aug 06 '18, 5:16 a.m.

Question was seen: 2,388 times

Last updated: Aug 16 '18, 1:03 p.m.

Confirmation Cancel Confirm