| Summary: | Internal error merging | ||
|---|---|---|---|
| Product: | [Technology] EGit | Reporter: | Doug Schaefer <cdtdoug> |
| Component: | Core | Assignee: | Matthias Sohn <matthias.sohn> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | major | ||
| Priority: | P3 | CC: | caniszczyk, jamesblackburn+eclipse, matthias.sohn, pd, stefan.lay, stephan.herrmann, tomasz.zarna |
| Version: | 0.10.0 | ||
| Target Milestone: | 1.2 | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | |||
|
Description
Doug Schaefer
pretty sure not all conflicts weren't resolved in "tests/test-all" (In reply to comment #1) > pretty sure not all conflicts weren't resolved in "tests/test-all" If I had Compare between branches, I'd be able to tell ;). I committed and pushed my changes to my talos branch and then did the merge from master in a different repo managed by msysgit and pushed the resulting talos branch back. It should just be a fast forward when I fetch and merge in egit, no? I looked it up in the code and when I understand your use-case correctly then this looks like your local file tests/test-all contained changes not yet known to jgit. And during merge jgit doesn't want to overwrite your local changes and therefore comes up with an error. Is there any chance that I can replay what you have done? Are the two commit you want to merge are already available somewhere? Or is it reproduceable (e.g. clone repo x, branch of at commit xyz and modify file <myFile.txt>. Merge with branch <other>) *** Bug 339531 has been marked as a duplicate of this bug. *** This is fairly straightforward to reproduce. 1) Create a simple repo with 2-branches 2) Change a file and commit on one branch 3) Change to the other branch 4) Change the same file (and add, if you want) 5) Attempt to perform the merge. At step 5 an internal error dialog will pop-up and two errors will be logged to the error log. Egit should helpfully prompt the user in this case like cgit does: bash:jamesb:xl-cbga-20:32816> git merge branch1 Updating d1cfbf6..59a7ae8 error: Your local changes to 'asdf2' would be overwritten by merge. Aborting. Please, commit your changes or stash them before you can merge. I'm seeing a similar error logged (reproducably): EGit: 1.1.0 Operation: Pull (branch is configured to rebase) Workspace has uncommitted changes. While it is correct to raise an issue I believe it is wrong to signal this with an Exception / Error Dialog / Log Entry. This is a normal use-case for which users should be given help as mentioned in comment 5 instead of raising alarms that something is terribly broken. Pushed patches for review: JGit: http://egit.eclipse.org/r/#change,4682 EGit: http://egit.eclipse.org/r/4683 merged as 8cb9c21bafa3c6784cb5ed73205a1f3505957893 (In reply to comment #6) > While it is correct to raise an issue I believe it is wrong to signal this > with an Exception / Error Dialog / Log Entry. > > This is a normal use-case for which users should be given help as mentioned > in comment 5 instead of raising alarms that something is terribly broken. I totally agree with Stephan. Throwing an exception seems to be to much. Why not return a MergeResult object with MergeFailureReason.DIRTY_WORKTREE as suggested in bug 356918 (http://egit.eclipse.org/r/#change,4177)? (In reply to comment #8) > merged as 8cb9c21bafa3c6784cb5ed73205a1f3505957893 I can't find it. Is it 26b5738? BTW, this change broke Orion, see bug 366818. So it's another example of an API breakage -- http://dev.eclipse.org/mhonarc/lists/egit-dev/msg02498.html. |