This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 208015 - Can't unshelve changes
Summary: Can't unshelve changes
Status: REOPENED
Alias: None
Product: versioncontrol
Classification: Unclassified
Component: Subversion (show other bugs)
Version: 7.1
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Ondrej Vrabec
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-02 12:06 UTC by bartvdc
Modified: 2012-02-03 12:28 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description bartvdc 2012-02-02 12:06:20 UTC
Using : NB 7.1, Win7,Maven projects & subversion. 

Shelve changes works but I can't unshelve changes. Whatever I select , I'm allways getting the message 'The patch cannot be applied in the selected context.'. 
I tried selecting the project, the source folder, the package and the class. Nothing helped. 

By the way, is shelve changes hidden on purpose ? I expected it in a context menu. 

Thanks,
Bart
Comment 1 Ondrej Vrabec 2012-02-02 12:22:58 UTC
If the unshelve changes fails, look into the Output tab called Patch Report and paste the content of the window here.
Comment 2 bartvdc 2012-02-03 07:35:50 UTC
Here's the output :


applying patch: C:\Users\vandercammen.b\.netbeans\7.1\config\Versioning\patch-storage\unfinishedChanges.patch
--- Successfully Patched ---
<none>
--- Failed ---
C:\Applic\Development\projects\finatmed-mvn\finatmed-main\finatmed-common\src\main\java\be\mil\cccis\util\message\Content.java (Cannot apply hunk @@ 7 )
3-feb-2012 8:33:05  ===========================================================================
applying patch: C:\Users\vandercammen.b\.netbeans\7.1\config\Versioning\patch-storage\unfinishedChanges.patch
--- Successfully Patched ---
<none>
--- Failed ---
C:\Applic\Development\projects\finatmed-mvn\finatmed-main\finatmed-common\src\main\java\be\mil\cccis\util\message\Content.java (Cannot apply hunk @@ 7 )
Comment 3 Ondrej Vrabec 2012-02-03 09:13:05 UTC
> C:\Applic\Development\projects\finatmed-mvn\finatmed-main\finatmed-common\src\main\java\be\mil\cccis\util\message\Content.java
> (Cannot apply hunk @@ 7 )
You must have made some changes to the file between shelving and unshelving. Shelve and unshelve works basically as a simple pair of export diff and apply diff. If you make some changes to a file that prevent application of the patch the unshelve action simply fails. I don't think we can do much about it. It's then up to you to apply the patch manually or modify the file to the state before right after shelving.
There could be a way to improve the shelve/unshelve action for subversion. Then would require:
1) Remember the revision number of the shelved files right after the shelve is done.
2) Before the unshelve action update the files to the remembered revision
3) Unshelve changes - apply the patch
4) Update again to the previous revision
However this heavyweight implementation was not the original intent and requires a lot of additional work.
Comment 4 bartvdc 2012-02-03 12:17:26 UTC
OK, it works when I don't change the file. I assumed it would merge automagically.
I suppose that when something changed I should revert first to the version I had before shelving.

Thanks for the replies,

Bart
Comment 5 Ondrej Vrabec 2012-02-03 12:19:28 UTC
You do not need to revert, update should do. See the steps described in Comment #3. If you follow them then 4) will merge the changes.
Comment 6 bartvdc 2012-02-03 12:28:00 UTC
OK, sorry. That works too.

Thanks,

Bart