| Summary: | [server] Git status response should give a clear criteria on conflicting file | ||
|---|---|---|---|
| Product: | [ECD] Orion | Reporter: | libing wang <libingw> |
| Component: | Client | Assignee: | Tomasz Zarna <tomasz.zarna> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | bokowski, Szymon.Brandys |
| Version: | 0.2 | ||
| Target Milestone: | 0.2 | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | |||
| Bug Depends on: | 343514 | ||
| Bug Blocks: | 339045, 342044 | ||
|
Description
libing wang
As discussed on the call, I will look at it tomorrow morning. Sorry with the late response. The merge result I'm getting on the server side from JGit for test cases 2 & 3 is not what I would expect. I filed bug 343514 against JGit. I haven't looked at the diffs, because apparently the repository is in a bad shape after the merge (pull). So I don't expect diffs to be returning anything meaningful. Bug 343514 needs to be fixed first. In the meantime, I would like to add an extra "bucket" to /git/status response for conflicting files to make Libing's life easier ;) The only problem is that the change in JGit making it possible is not yet in their nightly build (201104191910). I will check it again in a day or two. (In reply to comment #2) > In the meantime, I would like to add an extra "bucket" to /git/status response > for conflicting files to make Libing's life easier ;) The only problem is that > the change in JGit making it possible is not yet in their nightly build > (201104191910). I will check it again in a day or two. Will that be falgging a file as conflicting ? If yes , the type of the conflicting (both modified , one side deleted , etc) will be nicer.Then the client code should stop computing the flag and the redundant response will go away . I am asking this because I just checked in the code for showing red border on diff blocks and overview annotation. Basically when I am parsing a file's diff with a conflicting flag , I am checking each diff hunk to see it has the special string "<<<<<" or ">>>>>".Then in the compare editor you will see them as red .So you can click on the red markers from the overview and go to the places where you want to resolve the conflicts.This works now for test case 1. For test case 2 and 3 , if there is no special strings in the diff we have to figure out other ways to mark the conflicts. If we can go with this , the solution in M7 is still kind of hacking but much better. I did the same test cases in CVS and we understand that without structural compare during fetch , it is hard to compare 3-way. In another word , if a merge already happened and a conflicting file is generated , it is too late to do 3-way without knowing the common ancestor. (In reply to comment #3) > Will that be falgging a file as conflicting ? If yes , the type of the > conflicting (both modified , one side deleted , etc) will be nicer. There will be an extra "bucket" named "Conflicts" which will contain files with conflicts. I guess, the *type of conflict* can be still deducted from the file being present in other "buckets" i.e. "Added"+"Changed"+"Missing"+"Modified" = both modified, "Modified"+"Removed"+...=deleted by us etc. > In another word , if a merge > already happened and a conflicting file is generated , it is too late to do > 3-way without knowing the common ancestor. I totally agree it's too late in that case, but IMO it's a separate bug about being able to diff *fetched* (not pulled/merged) objects against your local repository with an option to modify the later to prevent possible conflicts. Here, we're talking about git status response when the merge has been done, no matter if it failed or succeed. (In reply to comment #4) > There will be an extra "bucket" named "Conflicts" which will contain files with > conflicts. It's done[1], I had to adopt to a change in JGit[2], which caused our tests to fail (bug 344930). Libing, please update the client side asap. > I guess, the *type of conflict* can be still deducted from the file > being present in other "buckets" i.e. "Added"+"Changed"+"Missing"+"Modified" = > both modified, "Modified"+"Removed"+...=deleted by us etc. This is no longer an option since guys in JGit decided that a conflicting file will not be included in any of the other "bucket"[2]. [1] http://git.eclipse.org/c/e4/org.eclipse.orion.server.git/commit/?id=fde2fe7a64a4558cac53dfb9b66c7a1ef513ecb3 [2] http://egit.eclipse.org/r/#change,3295 (In reply to comment #5) > (In reply to comment #4) > > There will be an extra "bucket" named "Conflicts" which will contain files with > > conflicts. > > It's done[1], I had to adopt to a change in JGit[2], which caused our tests to > fail (bug 344930). Libing, please update the client side asap. > Client followed up on ee6aaa01e244f638b0c45889960f34be9baed69a (In reply to comment #2) > The merge result I'm getting on the server side from JGit for test cases 2 & 3 > is not what I would expect. I filed bug 343514 against JGit. Change from http://egit.eclipse.org/r/#change,3294 has fixed bug 343514. Libing, could you please confirm that for cases 2 & 3 you're now getting a proper response from the server (a conflict)? If so, is there anything else we should address on this bug or can we close it? I've confirmed that both case 2 and 3 worked well. Closing now. |