| Summary: | [client][status] "Stage All" does not work | ||
|---|---|---|---|
| Product: | [ECD] Orion | Reporter: | Szymon Brandys <Szymon.Brandys> |
| Component: | Git | Assignee: | libing wang <libingw> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | major | ||
| Priority: | P3 | CC: | libingw, tomasz.zarna |
| Version: | 0.5 | ||
| Target Milestone: | 0.5 M1 | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | |||
|
Description
Szymon Brandys
I've seen this also. I couldn't reproduce it in Chrome 18.0.1025.45 beta-m. But in FF 10 I could. Kind of strange why it can be browser related. I pulled the latest code and ran it on my self hosting site. It worked on FF as well. I've checked that git-status-table.js hasn't been changed since Feb 21th, which means orion.eclipse.org is running the latest code. So I guess the running the raw code VS built in code makes the difference. Finally I found the reason: It is not related to browser or built version of source at all. It really depends on where you go to the git status page. If you go to git status page from your git repo root , then it works all the time. But if you go from a sub folder, e.g. , then it does not work. Here is the reason: In function stageMultipleFiles: function(gitCloneURI, paths , onLoad , onError) in gitClient, it requires the gitCloneURI, which is your current folder. It also requires paths, which your selected files. In case of a sub folder, the file.Path attribute returned from git status API is relative to the sub folder. Seems that stageMultipleFiles function does not handle this situation. If I use file.Name as the path, which is always a full path, then stageMultipleFiles works regardless gitCloneURI is sub folder. Tomasz/Szymon, should I use file.Name for stageMultipleFiles function in gitClient.js? Fixed with http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=9320c8eacb23fdfeba69fbb288bd512de30aa000. I don't see the reason not using .Name. Otherwise the issue will affect lot of people staging a group of files. Tomasz/Szymon, please correct if otherwise. good catch. I could never put my finger on when it worked and didn't work. (In reply to comment #6) > Tomasz/Szymon, please correct if otherwise. The field names in Git Status JSON should be aligned with those in File API. In Git Status we have { "Git": { "CommitLocation": "/gitapi/commit/HEAD/file/m/0.5/plugins/z.txt", "DiffLocation": "/gitapi/diff/Default/file/m/0.5/plugins/z.txt", "IndexLocation": "/gitapi/index/file/m/0.5/plugins/z.txt" }, "Location": "/file/m/0.5/plugins/z.txt", "Name": "0.5/plugins/z.txt", "Path": "plugins/z.txt" } and in File API we have: { ... "Length": 0, "LocalTimeStamp": 1330954485834, "Location": "/file/m/0.5/plugins/z.txt", "Name": "z.txt" } I would expect "Name" to be just the name of a file (File API). Then "RelativePath" a path relative to the location and "Path" absolute path in the filesystem. Please request this change first in our Git API and then change the UI. Your fix works for now btw, but the suggested change in Git API will break the UI again. |