| Summary: | Git repositories, Reference bar shouldn't display "[New branch]" | ||
|---|---|---|---|
| Product: | [ECD] Orion | Reporter: | xin chen <jiudechenxin> |
| Component: | Node | Assignee: | Silenio Quarti <Silenio_Quarti> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | enhancement | ||
| Priority: | P3 | CC: | ayl051, grant_gayed, mengzhixing0228, pwebster, Silenio_Quarti |
| Version: | 10.0 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Mac OS X | ||
| Whiteboard: | |||
| Bug Depends on: | |||
| Bug Blocks: | 474353 | ||
|
Description
xin chen
How can I reproduce this probelm on https://orionhub.org ? PW (In reply to Paul Webster from comment #1) > How can I reproduce this probelm on https://orionhub.org ? > > PW This bug only exists in node server, so I don't think it is possible to reproduce this problem on orionhub. In node server, you can check out the master branch and see if there is a "[New branch]" following the master branch. Simon (In reply to Simon Meng from comment #2) > > This bug only exists in node server, so I don't think it is possible to > reproduce this problem on orionhub. In node server, you can check out the > master branch and see if there is a "[New branch]" following the master > branch. OK, then this is also a problem with the node server code, not the client code. The return JSON from the node server is not quite correct. You need to collect a set of working JSON responses from orionhub.org or from running the java server and then compare that to what is returned from the node server. Use the Network view in your browser. PW Orionhub vs node server response can be found here, which is posted by Alvin. https://bugs.eclipse.org/bugs/attachment.cgi?id=258455&action=edit Over this past 2 months, I narrowed this bug to several files: gitRepositoryExplorer.js, util.js(under git folder), commit.js, branches.js. The function shortenRefName(ref) in util.js decides whether to add "[New branch]" in the reference bar. This function is called several places in other files I mentioned above and this is where I have trouble with. The key step to debug is to find the difference between the structures of a newly-created local branch and a remote branch. I have used several strategies to differentiate these kinds of branches but they all seem not working properly. So the focus can be put on how to effectively differentiate these kinds of branches. Their structures can be compared using built-in web dev tools in Chrome/Safari. Fixed in latest |