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

Bug 358275

Summary: [server] Some changes to git tasks required
Product: [ECD] Orion Reporter: Malgorzata Janczarska <malgorzata.tomczyk>
Component: GitAssignee: Tomasz Zarna <tomasz.zarna>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: 0.3 M2   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Bug Depends on:    
Bug Blocks: 358214    

Description Malgorzata Janczarska CLA 2011-09-20 13:04:20 EDT
While Bug 358079 has been implemented there are still some changes that require to use it on UI.
1. Task Location should be returned in response, not only the header (progress service uses the one in response)
2. When the task is finished the message should say something like ("Git log generated"), it currently contains the result
3. The result should be returned in the Result field in form of JSON. It's currently returned in Result.Message as string.
Comment 1 Tomasz Zarna CLA 2011-09-21 05:20:13 EDT
(In reply to comment #0)
> 3. The result should be returned in the Result field in form of JSON. It's
> currently returned in Result.Message as string.

I can accomplish that by returning a generated commits log in Result.JsonData. Would that work for you? I would need to rename org.eclipse.orion.server.core.ServerStatus.ERROR_DATA to JSON_DATA first. Putting the log directly under the Result field is not an option since it's expected to represent a serialized ServerStatus object.
Comment 2 Malgorzata Janczarska CLA 2011-09-21 05:25:41 EDT
(In reply to comment #1)
> (In reply to comment #0)
> > 3. The result should be returned in the Result field in form of JSON. It's
> > currently returned in Result.Message as string.
> 
> I can accomplish that by returning a generated commits log in Result.JsonData.
> Would that work for you? I would need to rename
> org.eclipse.orion.server.core.ServerStatus.ERROR_DATA to JSON_DATA first.
> Putting the log directly under the Result field is not an option since it's
> expected to represent a serialized ServerStatus object.

I was thinking that when we have and error we leave the ERROR_DATA and when we have successful response we return JSON_DATA, but we may as well replace ERROR_DATA as JSON_DATA, to avoid two different fields for different responses. But when you decide on it than I will have to change some code on client, so let me know when you push.
Comment 3 Tomasz Zarna CLA 2011-09-21 06:04:49 EDT
Fixed with http://git.eclipse.org/c/orion/org.eclipse.orion.server.git/commit/?id=e594e20df1a0d278d263ef2e0a0febf22ac8ab9a.

(In reply to comment #2)
> But when you decide on it than I will have to change some code on client, so let
> me know when you push.

Done in http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=889fe64fe40e5ae9731c4290bbe3c9461123871e. 

Don't forget to set GitJob.WAIT_TIME to a reasonable value (e.g. 100 ms) when you're done.