Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 354670

Summary: [api] getChangeSets Iterator
Product: z_Archived Reporter: Alvaro Sanchez-Leon <alvaro.sanchez-leon>
Component: MylynAssignee: Alvaro Sanchez-Leon <alvaro.sanchez-leon>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: lmcbout, marco.masse, sebastien.dubois, steffen.pingel
Version: 0.8   
Target Milestone: 0.9   
Hardware: PC   
OS: Windows Vista   
Whiteboard:
Bug Depends on:    
Bug Blocks: 330616, 355096    

Description Alvaro Sanchez-Leon CLA 2011-08-12 15:50:34 EDT
The current api to obtain the changesets associated to a repository returns a complete list.


	public abstract List<ChangeSet> getChangeSets(ScmRepository repository, IProgressMonitor monitor)
			throws CoreException;


Obtaining the full list may take several minutes as these are often in the order of tens of thousands.

a new api returning an Iterator<ChangeSet> shall provide the possibility to implement cache mechanisms or query by smaller chunks as the user move along the list.
Comment 1 Alvaro Sanchez-Leon CLA 2011-08-18 09:38:41 EDT
Update:
Implementation started and is based on:

1) core api updates to return a ChangeSet Iterator
2) internal  Blocking queue (core) to limit the number of parsed changesets e.g. max 40
3) implement thread to fill in queue as room becomes available e.g. looping to retrieve and resolve base and target versions in chunks of 20 changesets
4) modify UI to use the new interface and consume the elements in the queue via the iterator
Comment 2 Alvaro Sanchez-Leon CLA 2011-08-18 11:23:44 EDT
(In reply to comment #1)
> Update:
> Implementation started and is based on:
> 
> 1) core api updates to return a ChangeSet Iterator
> 2) internal  Blocking queue (core) to limit the number of parsed changesets e.g.
> max 40
> 3) implement thread to fill in queue as room becomes available e.g. looping to
> retrieve and resolve base and target versions in chunks of 20 changesets
> 4) modify UI to use the new interface and consume the elements in the queue via
> the iterator

The implementation above is specific to subclipse and therefore the implementation is now tracked on bug 355096 and Bug 355098
Comment 3 Alvaro Sanchez-Leon CLA 2011-08-25 09:45:17 EDT
Implemented and committed