| Summary: | Add "Replace With -> Theirs" in conflicting state of merge and cherry-pick | ||
|---|---|---|---|
| Product: | [Technology] EGit | Reporter: | Robin Stocker <robin> |
| Component: | UI | Assignee: | Project Inbox <egit.ui-inbox> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | enhancement | ||
| Priority: | P3 | CC: | adietish, angvoz.dev, eclipse.phc5x, ghiaccio84, gunnar, markus.duft, markus.kell.r, matthias.sohn, mondgesicht, sorenm, tomasz.zarna, vlad.gheorghe |
| Version: | unspecified | ||
| Target Milestone: | 3.6 | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
| Bug Depends on: | 391856, 390147 | ||
| Bug Blocks: | |||
|
Description
Robin Stocker
+1. That would really help especially when resolving merge conflicts of binary files (eg. DLLs, images, etc.). I think this would also make a nice action in the Merge Tool. +1, same for "--ours" how about: "Replace with MERGE_HEAD" "Replace with ORIG_HEAD" (In reply to comment #2) > "Replace with MERGE_HEAD" > "Replace with ORIG_HEAD" I would prefer the friendly names "theirs" and "mine/ours". Those should be immediately be recognized by users not so familiar with all the Git terms. ;) (In reply to comment #3) > (In reply to comment #2) > > "Replace with MERGE_HEAD" > > "Replace with ORIG_HEAD" > > I would prefer the friendly names "theirs" and "mine/ours". Those should be > immediately be recognized by users not so familiar with all the Git terms. ;) +1, I see your point +1 about the names. I started implementing this, but hit a dead end with org.eclipse.ui.menus. The problem is that these commands should only be shown when the repository is in a certain state. There seem to be two ways of doing this: 1. Use a dynamic menu (with CompoundContributionItem) 2. Use visibleWhen to link the visibility with the enabled state Both of these ways require the command to be defined as an org.eclipse.ui.menus extension (not org.eclipse.ui.popupMenus). The problem is how to specify the locationURI of the menuContribution so that the resulting command is in the "Replace With" menu. I tried many things, but the replaceWithMenu could not be used as the ID, the command didn't show up. In this post, I think Paul Webster says that the locationURI can not refer to IDs defined in org.eclipse.ui.popupMenus (legacy, apparently): http://www.eclipsezone.com/eclipse/forums/t103764.html#92183897 What kind of works is this: <menuContribution locationURI="popup:org.eclipse.ui.popup.any?endof=additions"> <menu id="replaceWithMenu" label="Replace With"> <separator name="replaceWithGroup" visible="true"> </separator> <separator name="gitReplaceWithGroup" visible="true"> </separator> <command commandId="...ReplaceWithOurs" ... With this, the standard "Replace With" commands stay where they are. But I don't like that the Replace With menu is "overwritten". Any advice? i think it would be important to have those actions in /somewhere/, even if it's not the final location where it should end up. maybe there should be a "Merge" submenu containing those actions when repository is in a merge state, with submenus "Resolve using Ours" and "Resolve using Theirs" or something like that. that would offer more control over the menu, as you don't have to reuse things you can't control. robin, could you (even when this is in a different sub-menu) push a change to gerrit, or share your work in any other way? i'd really really need this, as in our repo there are a lot of binary files which cannot be merged without commandline at all then... i'd even create a special egit version for us only with this change - it's very important! Ok, I'll see what I can do (unfortunately, I don't have access to that code right now). ping - this would be really a requirement for us! ping - we're merging binary files every day a couple of times. this is really a pain! /please/ find the change and send it to me if you can. I had just worked on the UI side so far, but it turns out some plumbing is necessary, see bug 390147. *** Bug 393758 has been marked as a duplicate of this bug. *** +1 This missing feature makes egit more or less useless, since the repository can be put in a state where the users are stuck ! It's better to have these buttons present all the time, then not at all. When pushing the button, check the state of the repository, if it's not in the correct state show an error popup or something. +1 This would be a very useful feature. (In reply to Robin Stocker from comment #11) > I had just worked on the UI side so far, but it turns out some plumbing is > necessary, see bug 390147. It seems #390147 is now fixed, therefore this bug is no more blocked by missing functionality in JGit. *** Bug 424629 has been marked as a duplicate of this bug. *** *** Bug 404424 has been marked as a duplicate of this bug. *** Pushed change to add a menu to staging view for this (see also parent changes): https://git.eclipse.org/r/37329 merged as 804afc6909e835b07b8ce8e22f3d2fa228e13e9f |