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 149779 - Unable to import patch created by "Export Uncommitted Changes"
Summary: Unable to import patch created by "Export Uncommitted Changes"
Status: NEW
Alias: None
Product: versioncontrol
Classification: Unclassified
Component: Code (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Ondrej Vrabec
URL:
Keywords:
: 153752 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-10-10 14:57 UTC by pribyl
Modified: 2014-06-05 12:20 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 pribyl 2008-10-10 14:57:37 UTC
Product Version: NetBeans IDE Dev (Build 200810100201)
Java: 1.6.0_10-rc; Java HotSpot(TM) Client VM 11.0-b15
System: Windows XP version 5.1 running on x86; Cp1250; cs_CZ (nb)

I created sample java project and initialized it as a hg repository and created a clone of this project.
In original project a made some changes and (from the project root) invoked Export Uncommitted Changes".
The patch was created, but the was no way how to apply it. I tried it on the cloned project's root without success. 
Then I reverted the changes on the original project and tried to apply it on the original project's root.
Still i obtained the same error (in the output):
unable to find 'originalrepo/Main.java' for patching

After many unsuccessful trials, I found a workaround how to apply it.
I changed the generated code in the patch file from:
Index: src/originalrepo/Main.java
--- src/originalrepo/Main.java Base (BASE)
+++ src/originalrepo/Main.java Locally Modified (Based On LOCAL)

to:
Index: src/originalrepo/Main.java
--- b/src/originalrepo/Main.java Base (BASE)
+++ b/src/originalrepo/Main.java Locally Modified (Based On LOCAL)

(added the b/ - I saw they are generated in the "Export diff" patches, so I tried it)
And it worked! The patch was applied.

Can there be a problem with the patch generating, or did I just use wrong approach?
Comment 1 Tomas Stupka 2008-10-31 10:36:23 UTC
patch files created by versioning/unicommited changes should be imported via tools/apply diff patch

i guess this is confusing, lets see if we can do something about it 
Comment 2 Tomas Stupka 2008-11-25 10:01:02 UTC
*** Issue 153752 has been marked as a duplicate of this issue. ***