Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 332660 - Cherry pick overwrites changes in the working tree
Summary: Cherry pick overwrites changes in the working tree
Status: RESOLVED FIXED
Alias: None
Product: EGit
Classification: Technology
Component: Core (show other bugs)
Version: 0.10.0   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-15 12:08 EST by Jens Baumgart CLA
Modified: 2011-07-07 17:55 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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