| Summary: | [client][status] Failed merges cannot be resolved | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [ECD] Orion | Reporter: | John Arthorne <john.arthorne> | ||||
| Component: | Git | Assignee: | Tomasz Zarna <tomasz.zarna> | ||||
| Status: | RESOLVED DUPLICATE | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | johnjbarton, malgorzata.tomczyk, susan, Szymon.Brandys | ||||
| Version: | unspecified | ||||||
| Target Milestone: | --- | ||||||
| Hardware: | PC | ||||||
| OS: | Windows 7 | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
John Arthorne
Created attachment 203436 [details]
Screen shot
Of course the message "FAILED. Go to Git Status page" makes sense only for the git log or git clone pages. On git status, the page should be just refreshed. (In reply to comment #0) > Lately I have been getting frequent merge failures when trying to merge remote > master when I have commits I have not pushed. The message simply says "FAILED. > Go to Git Status page". However I am already on the Git Status page and there > is no clear way to resolve the merge. Nothing is showing in unstaged/staged. John, do you see any changes to resolve when you refresh the page (F5)? *** Bug 359259 has been marked as a duplicate of this bug. *** For the record, in bug 359259 comment 3 Susan suggested that "For 0.3 we could have the FAIL message link to a tips and tricks page. See bug 359271.". Sounds like a good idea to me. (In reply to comment #2) > John, do you see any changes to resolve when you refresh the page (F5)? No. This happened again today, and refreshing showed me nothing. In the browser debugger I can see this JSON response object: { "FailingPaths": {"bundles/org.eclipse.orion.server.authentication.form.core/src/org/eclipse/orion/server/authentication/form/core/FormAuthHelper.java": "DIRTY_WORKTREE"}, "Result": "FAILED" } However I don't see any unstaged or staged changes when I refresh the status page. Using Git command line I get this: C:\1target\eclipseweb\org.eclipse.orion.server>git status # On branch master # Your branch and 'origin/master' have diverged, # and have 4 and 9 different commit(s) each, respectively. # nothing to commit (working directory clean) In this case invoking merge on the command line succeeded with no conflict. So it looks like JGit believed there was a conflict and there wasn't. Perhaps a line terminator problem? I noticed in this case the error response to the client includes "DIRTY_WORKTREE". This suggests to me we can do slightly better than a link to a wiki page of hints and tricks. In this case if we know the problem is a dirty working tree, we can offer a message similar to what you get on the command line in this case (Merge failed because you have uncommitted changes in your working tree. Commit or reset your changes and try again). (In reply to comment #6) > In this case invoking merge on the command line succeeded with no conflict. So > it looks like JGit believed there was a conflict and there wasn't. Perhaps a > line terminator problem? May be, however, if you had cloned the repo with Orion this shouldn't be an issue. It's when you link a repo cloned with CGit, you're asking for trouble. I tried to reproduce it by setting my repo as described in comment 5: git checkout c42295bdf1338dc6e21a4996cc5ff4961f03ab2f git branch -b john1 git checkout 617fd5ac2c037e1b023076bc4e414549da77bc65 git branch -b master1 git checkout john1 Then I switched to Orion and merged "john1" (active) with "master1". It went fine. The only glitch I noticed was a progress message saying "MERGED. Go to Git Status page.", which makes little sense if the merge was successful. *** Bug 370853 has been marked as a duplicate of this bug. *** Just my experience with this one: I had three commits. I used the CherryPick to apply two of them successfully, then checked out one file related to the third commit and then the merge was successful. I think the model of "FAILED Go to Git Status Page" is itself a bug: I'm already on the Git Status page. (In reply to comment #10) > Just my experience with this one: > I had three commits. I used the CherryPick to apply two of them successfully, > then checked out one file related to the third commit and then the merge was > successful. > > I think the model of "FAILED Go to Git Status Page" is itself a bug: I'm > already on the Git Status page. agree. So is "Merged. Go to Git Status Page" We should at least fix these messages for the git status case. The case that still fails badly is when you attempt a merge or rebase when you have staged but uncommitted changes. In this case you click "Fetch" or "Rebase" and absolutely nothing happens. No error message and it seems to do nothing. Just hit this again today in I20120210. (In reply to comment #12) > The case that still fails badly is when you attempt a merge or rebase when you > have staged but uncommitted changes. I've tried some trivial cases today and they all worked for me. They either succeeded or failed with a message about conflicts. John it would be great if you could help me with some steps. > In this case you click "Fetch" or "Rebase" > and absolutely nothing happens. No error message and it seems to do nothing. "Fetch" should be neutral to your active branch as it affects a remote branch. I'm not following the current shape of the progress handling, but I would assume "nothing happens" is a signal that all went well, Gosia? Unless you know that there are commits on the remote and the "Fetch" doesn't fetch them. As for "Rebase", again from a quick look it worked fine to me, but obviously I'm missing a real life situation. Is the Git console and git support in Orion (JGit) divergence, mentioned in comment 6 still an issue? (In reply to comment #13)t seems to do nothing. > > "Fetch" should be neutral to your active branch as it affects a remote branch. > I'm not following the current shape of the progress handling, but I would > assume "nothing happens" is a signal that all went well, Gosia? Unless you know > that there are commits on the remote and the "Fetch" doesn't fetch them No, this is a bug. Users need feedback, even the command line says "already up to date". How can I tell if I'm update date, the Fetch never succeeded or the tool is just broken? (In reply to comment #14) > No, this is a bug. Users need feedback, even the command line says "already up > to date". You're right. I asked Szymon about it and he confirmed the "Ok" responses are not displayed to the user. You can find them after clicking on the operations spinner in the top right corner, but I agree they should be more visible. Please leave a comment mentioning it on bug 371261 which is more about handling progress messages, while this one is for failing merge/rebase. If fetch was run as a task then you'll see the task as completed in the task list for about 5 minutes. The rest depends on the command implementation. I meant to say merge and rebase.. not fetch. The case is very simple:
- On Git Status page, stage a change but don't commit
- On Repositories page, click Fetch and then Merge on same branch
-> Fails. There is no message shown to the user, or in the console. Reviewing the network traffic, I can see the POST method has a 200 OK response, but has this body:
{
"FailingPaths": {"bundles/org.eclipse.orion.client.core/about.html": "DIRTY_INDEX"},
"Result": "FAILED"
}
Same use case, but using Rebase:
POST request looks like this:
{"Rebase":"origin/master","Operation":"BEGIN"}:
POST response is 200 OK with this body:
{"Result": "FAILED"}
Nothing is shown to the user or in the console.
*** Bug 371617 has been marked as a duplicate of this bug. *** Szymon has fixed it yesterday[1]. For merge the message now stays on and says: "FAILED: Go to Git Status page.", for a failed rebase it does even better job saying: "FAILED_PENDING_CHANGES. Repository contains pending changes. Please commit or stash them. Go to Git Status page." [1] bug 370235 *** This bug has been marked as a duplicate of bug 370235 *** |