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

Bug 347134

Summary: [server] Need the default remote branch in the local branch JSON representation
Product: [ECD] Orion Reporter: Szymon Brandys <Szymon.Brandys>
Component: GitAssignee: Szymon Brandys <Szymon.Brandys>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 Flags: tomasz.zarna: review+
Version: 0.2   
Target Milestone: 0.2   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Bug Depends on:    
Bug Blocks: 347127, 347943    

Description Szymon Brandys CLA 2011-05-25 07:06:05 EDT
Before we add a picker in the clone UI to select where to push changes from our active local branch, I would like to push changes to the default remote branch. To do it I need DefaultRemoteBranchLocation in the branch JSON.
Comment 2 Szymon Brandys CLA 2011-06-01 09:32:30 EDT
Example:

Response for http://localhost:8080/gitapi/branch/file/x/ is

{"Children": [
  {
    ...
    "Location": "http://localhost:8080/gitapi/branch/b/c/file/x/",
    "Name": "b/c",
    "RemoteLocation": "http://localhost:8080/gitapi/remote/origin/master/file/x/",
    "Type": "Branch"
  },
  {
    ...
    "Location": "http://localhost:8080/gitapi/branch/elo/file/x/",
    "Name": "elo",
    "RemoteLocation": "http://localhost:8080/gitapi/remote/origin/master/file/x/",
    "Type": "Branch"
  },
  {
    ...
    "Location": "http://localhost:8080/gitapi/branch/master/file/x/",
    "Name": "master",
    "RemoteLocation": "http://localhost:8080/gitapi/remote/origin/master/file/x/",
    "Type": "Branch"
  }
]}

RemoteLocation location is fine only for the active local branch.

Response for http://localhost:8080/gitapi/branch/elo/file/x/

{
  "CloneLocation": "http://localhost:8080/gitapi/clone/file/x/",
  "CommitLocation": "http://localhost:8080/gitapi/commit/elo/elo/file/x/",
  "Current": false,
  "HeadLocation": "http://localhost:8080/gitapi/commit/HEAD/elo/file/x/",
  "Location": "http://localhost:8080/gitapi/branch/elo/file/x/",
  "Name": "elo",
  "RemoteLocation": "http://localhost:8080/gitapi/remote/origin/master/elo/file/x/",
  "Type": "Branch"
}

RemoteLocation is wrong.
Comment 3 Szymon Brandys CLA 2011-06-01 10:27:22 EDT
I'm investigating.
Comment 4 Szymon Brandys CLA 2011-06-06 08:23:37 EDT
Fixed with cecf50c93abbcf0827146da8b446bedaca122a0e and 083c628264feed5d0d0e72213225b9bac543f34d.