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.
Note that I did not add anything such as "ssh = d:/Install/putty/plink -ssh -l user" into mercurial.ini. I believe the described problem can be achieved even in other ways but this one is how I am able to reproduce. Steps to reproduce: 1) Versioning | Invoke Mercurial | Clone Other... from main menu. 2) Enter valid (well it can be even invalid...) repository path and push Next 3) Enter valid Name and Directory in last step and push Finish result: Progressbar with text Cloning... apears. Of course it won't ever finish as there is no ssh command specified. Same result is from command line, that's not the problem. The real problem is that after you cancel it clicking the cross on progress bar and confirming, the Clone Other... wizard is broken and unusable. If you invoke it again, the URL is still there but the rest of the wizard suggest it is in wrong format. Even when you type different one, it doesn't work. Pushing the Next button does nothing, you are still left in the first step afterwards. Using nbm for RC1 but I guess this problem is even in older builds ---- Product Version: NetBeans IDE 6.0 RC1 (Build 200711131200) Java: 1.6.0_03; Java HotSpot(TM) Client VM 1.6.0_03-b05 System: Windows Vista version 6.0 running on x86;
I'm running the dev build from head on Win XP, with hg 0.9.5 and I'm not seeing the issues you describe. I can't get to the cancel button quickly enough. Can you describe to me which URL's you are using and I'll see if I can repo it.
I can email you the repo location if you want, but I believe there is not problem in the repo, but in the external ssh command. I guess you have some line like ssh = <path to something like ssh on windows> in your mercurial.ini? Or maybe you have some environmental variable with similar meaning. Try to remove them and then you should be able to reproduce without any problem. If you don't have ssh specified, the progress bar never finishes so you are forced to cancel it. And after that the Clone Other wizard is broken...
Applied workaround to CVS head to reset the RequestProcessor cache, so the Clone is no longer broken. However, I do not think we are cleanly exciting the hg clone command and this needs further investigation, so this hg process is set a force kill.
Tried using the setCancellable hook, within the Clone Action, in the HgProgressSupport support, before calling support.start(...): support.setCancellableDelegate(new Cancellable() { public boolean cancel() { Process proc = HgCommand.getProcess(); if (proc != null) { proc.destroy(); } } It does get invoked and does kill the top level process but it has several problems: 1. It just kills the top level process that was spawned and not any sub processes in the HgCommand.execEnv(). For instance when we do a ssh based clone on windows we see plink.exe being spawned. This is a known issue and we will need to see if we can workaround it. We should be able to on Unix, but may not be able to on Windows, because "Windows does not maintain parent-child relationships between processes": http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4770092 http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4485742 http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4212450 2. If we do this destroy() the Mercurial Output tab becomes broken and will not take any further output. This would need further investigation For now as we have fixed the "Clone Other is broken", I'd suggested dropping the priority to P3.
Created attachment 53111 [details] Some ideas on using setCancelable()
Changing to P3 as the original broken behavior has been fixed, though we still have the issue of stray processes.
*** Issue 126979 has been marked as a duplicate of this issue. ***
Raising priority to match duplicate filed: #126979
The problem is as described above, that on Windows we will not be able to cancel the exec'ed hg call, though we should be able to on Unix. For now should we just not allow the cancel to be done or throw up a dialog stating that we cannot cancel the clone and to do so the user will need to manually kill the hg process externally, giving appropriate info for Windows or Unix.
P3. Please provide a descriptive notification for user that it's not possible to cancel the process.
On Windows added a cancellable hook to catch when the user is trying to cancel and warn them that this is not supported on Windows. The user can cancel the clone on Unix platforms. When they hit the cancel x in the status bar a dialog comes up asking them if they are sure they want to cancel the task. I cannot alter this behavior as there is no option on the Cancellable Interface for me to turn this off. When they hit Yes then the cancellable dialog comes up warning them that they cannot cancel. We will not be able to do anything more on Windows, due to the limitations described above already. changeset: 69698:764b4d277fdf tag: tip user: jrice@netbeans.org date: Mon Feb 25 16:52:03 2008 +0000 summary: #121911: Notify user they cannot Cancel Clone on Windows Mercurial Commit ---------------- #121911: Notify user they cannot Cancel Clone on Windows Committing 3 files to repository for Mercurial: /export/home/jr140578/work/main_work/mercurial/src/org/netbeans/modules/mercurial/HgProgressSupport.java /export/home/jr140578/work/main_work/mercurial/src/org/netbeans/modules/mercurial/ui/clone/Bundle.properties /export/home/jr140578/work/main_work/mercurial/src/org/netbeans/modules/mercurial/ui/clone/CloneAction.java INFO: End of Commit
Verified in Build 200803021202