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 123718 - Import patch doesn't work.
Summary: Import patch doesn't work.
Alias: None
Product: versioncontrol
Classification: Unclassified
Component: Mercurial (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: issues@versioncontrol
Keywords: RELNOTE
Depends on:
Reported: 2007-12-10 07:02 UTC by Peter Pis
Modified: 2008-01-03 09:41 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
Description Peter Pis 2007-12-10 07:02:43 UTC
Product Version: NetBeans IDE 6.0 (Build 200711261600)
Java: 1.6.0_03; Java HotSpot(TM) Client VM 1.6.0_03-b05
System: Windows XP version 5.1 running on x86; Cp1252; en_GB (nb)
Userdir: D:\ide\60daily\user3

1. Open project under "Hg" control.
2. Clone the project.
3. In original project make some changes and commit them.
4. Select original project and invoke "Versioning | Export Diff..." main menu action.
5. Select the cloned project and invoke "Versioning |Import Patch" main menu action.

Action starts (status bar of NB indicates so, but it doesn't take effect and it's running endless. It should be stopped
Comment 1 novakm 2007-12-10 10:11:20 UTC
I've followed described scenario and it works for me as expected, decreasing priority.

Mercurial client version 0.9.5

Product Version: NetBeans IDE 6.0 (Build 200711261600)
Java: 1.5.0_13; Java HotSpot(TM) Client VM 1.5.0_13-b05
System: Windows Vista version 6.0 running on x86; Cp1252; en_GB (nb)
Userdir: D:\install\6.0_200711261600\userdir
Comment 2 John Rice 2007-12-10 11:17:56 UTC
I can reproduce the problem. Import is failing at the Mercurial level and we are not handling the failure. Trying the
same command we issue in the IDE from the command line, I see the following Hg error:

C:\Documents and Settings\John>hg import -v --repository "C:\Documents and Setti
ngs\John\My Documents\NetBeansProjects\JavaApplication10_clone0" --cwd "C:\Docum
ents and Settings\John\My Documents\NetBeansProjects\JavaApplication10_clone0" C
applying C:\tmp\JavaApplication10_1_0bde5b9d182c
** unknown exception encountered, details follow
** report bug details to
** or
** Mercurial Distributed SCM (version feac5b0bf9ba+win32extras)
Traceback (most recent call last):
  File "hg", line 31, in <module>
  File "mercurial\dispatch.pyc", line 20, in run
  File "mercurial\dispatch.pyc", line 29, in dispatch
  File "mercurial\dispatch.pyc", line 45, in _runcatch
  File "mercurial\dispatch.pyc", line 348, in _dispatch
  File "mercurial\dispatch.pyc", line 401, in _runcommand
  File "mercurial\dispatch.pyc", line 357, in checkargs
  File "mercurial\dispatch.pyc", line 340, in <lambda>
  File "mercurial\commands.pyc", line 1580, in import_
  File "mercurial\patch.pyc", line 81, in extract
  File "mercurial\demandimport.pyc", line 70, in __call__
TypeError: 'unloaded module' object is not callable

I'll check with the Hg folks and see what's up. Maybe the version of Hg you are running. I would drop back and run the
standard 0.9.5 release and see if the problem persists.

Comment 3 John Rice 2007-12-10 11:35:28 UTC
Bug logged with Hg:
Comment 4 Peter Pis 2007-12-10 12:03:00 UTC
Due to this fact I am downgrading the issue. It's not a stopper. 
Comment 5 John Rice 2007-12-10 12:09:25 UTC
Confirmed that Import works with official 0.9.5 release:

Mercurial Export
exporting patch:
INFO: End of Export

Mercurial Import
applying C:\tmp\JavaApplication11_1_1ff78c22754e
patching file src/javaapplication11/
INFO: End of Import

Will create a patch to handle the "** unknown exception encountered" and return cleanly.
Comment 6 John Rice 2007-12-10 12:28:22 UTC
Need to release note the issue as others will be trying out the TortoiseHg release on Windows
Comment 7 John Rice 2007-12-10 17:44:54 UTC
Looked at adding code to handle the exception raised. The problem is that this never comes back to the Plugin. We are
stuck in execEnv() while ((line = input.readLine()) != null)

We could put the I/O into yet another thread and setup a timer to callback on, but that seems to be fraught with
problems as, with some remote clone operations you could be minutes waiting for hg to come back.

Apparently this Hg issue is fixed in Head and Selenic will release an update. I will close the issue and release note it.
Comment 8 John Rice 2007-12-10 17:48:04 UTC

msg4560 (view)  	Author: sborho  	Date: 2007-12-10.16:03:54  	
It's been fixed in the patch queue.  I hope to release a new package this week
that fixes all the known bugs in the December release.
Comment 9 John Rice 2007-12-10 22:15:50 UTC
Just tested a respin of the TortoiseHg package:

And import is now working. I'll release note the issue.
Comment 10 Peter Pis 2007-12-11 08:05:49 UTC