Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 347134 - [server] Need the default remote branch in the local branch JSON representation
Summary: [server] Need the default remote branch in the local branch JSON representation
Status: RESOLVED FIXED
Alias: None
Product: Orion
Classification: ECD
Component: Git (show other bugs)
Version: 0.2   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 0.2   Edit
Assignee: Szymon Brandys CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 347127 347943
  Show dependency tree
 
Reported: 2011-05-25 07:06 EDT by Szymon Brandys CLA
Modified: 2011-09-02 03:46 EDT (History)
0 users

See Also:
tomasz.zarna: review+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.