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

Bug 349658

Summary: [server] Simplify implementation of GitHandlers, introduce VOs for clone, branch, remote and so on
Product: [ECD] Orion Reporter: Tomasz Zarna <tomasz.zarna>
Component: GitAssignee: Tomasz Zarna <tomasz.zarna>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: Szymon.Brandys
Version: 0.2   
Target Milestone: 0.3 M2   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Bug Depends on: 348557    
Bug Blocks:    

Description Tomasz Zarna CLA 2011-06-17 04:47:59 EDT
Working with GitHandlers has become cumbersome as more features are added and more HTTP methods gets supported. The trickiest part is handling paths sent as the part of a URI or as a parameter. Translating them to a Orion file or workspace path can be a real pain. The code is cluttered with bunch of utility methods like those from GitUtils class or different flavors of BaseToXConverters.

A solution to that may an introduction of object that would represent certain entities in git logic. Here are some examples:
* WebClone (already have it)
* Branch
* Remote
* Diff
* Commit
* ...

All of them (except for the first one) would be derivative of a WebClone so they operate in a proper context. In other words, a Diff object can be created only for an concrete WebClone. 

Each object will have a method to serialize it to JSON which would simplify creating responses. This should help fixing bug 345402 and bug 349290.
Comment 1 Tomasz Zarna CLA 2011-08-08 07:06:27 EDT
(In reply to comment #0)
> A solution to that may an introduction of object that would represent certain
> entities in git logic. Here are some examples:
> * WebClone (already have it)
> * Branch
> * Remote

These two and RemoteBranch have been already added on http://git.eclipse.org/c/orion/org.eclipse.orion.server.git/?h=bug353557 while working on bug353557.
Comment 4 Tomasz Zarna CLA 2011-08-18 09:55:54 EDT
*** Bug 345402 has been marked as a duplicate of this bug. ***