Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 332660

Summary: Cherry pick overwrites changes in the working tree
Product: [Technology] EGit Reporter: Jens Baumgart <jens.baumgart>
Component: CoreAssignee: Project Inbox <egit.core-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: matthias.sohn, stefan.lay
Version: 0.10.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Jens Baumgart CLA 2010-12-15 12:08:11 EST
Change a file X

Then execute the cherry pick action in the history view. Choose a commit that contains changes in file X.

Result: file X is overwritten. The changes performed in the working tree are lost.
Comment 1 Stefan Lay CLA 2011-06-28 07:46:38 EDT
We retested it and got another behaviour: There is an exception thrown (see below) and listed in the error log, however, there is no error dialog. The repository seems not to be changed.
Comment 2 Stefan Lay CLA 2011-06-28 07:47:55 EDT
Here is the exception mentioned in the comment above:

org.eclipse.core.commands.ExecutionException: The cherry-pick failed
	at org.eclipse.egit.ui.internal.history.command.CherryPickHandler.execute(CherryPickHandler.java:54)
	at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:293)
	at org.eclipse.core.commands.Command.executeWithChecks(Command.java:476)
	at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508)
	at org.eclipse.ui.internal.handlers.HandlerService.executeCommand(HandlerService.java:169)
	at org.eclipse.ui.internal.handlers.SlaveHandlerService.executeCommand(SlaveHandlerService.java:241)
	at org.eclipse.ui.internal.handlers.SlaveHandlerService.executeCommand(SlaveHandlerService.java:241)
	at org.eclipse.ui.internal.handlers.SlaveHandlerService.executeCommand(SlaveHandlerService.java:241)
	at org.eclipse.ui.menus.CommandContributionItem.handleWidgetSelection(CommandContributionItem.java:829)
	at org.eclipse.ui.menus.CommandContributionItem.access$19(CommandContributionItem.java:815)
	at org.eclipse.ui.menus.CommandContributionItem$5.handleEvent(CommandContributionItem.java:805)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
Comment 3 Jens Baumgart CLA 2011-07-07 08:58:19 EDT
Fix proposed: http://egit.eclipse.org/r/3846
Comment 4 Matthias Sohn CLA 2011-07-07 17:55:29 EDT
merged as 8a33e4fa4ed5f4983ad57a9dcde7538e149ff910