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.
Determining result of executed command is wrong or at least is not properly described in output tab. For example trying to commit something from IDE results in : Mercurial Commit ---------------- Added 4 stable functional tests Committing 7 files to repository for Mercurial: D:\srcNB\6.1\main\mercurial\test\qa-functional\src\org\netbeans\test\mercurial\main\commit\CloneTest.java D:\srcNB\6.1\main\mercurial\test\qa-functional\src\org\netbeans\test\mercurial\main\commit\IgnoreTest.java D:\srcNB\6.1\main\mercurial\test\qa-functional\src\org\netbeans\test\mercurial\main\delete\DeleteTest.java D:\srcNB\6.1\main\mercurial\test\qa-functional\src\org\netbeans\test\mercurial\main\commit\InitializeTest.java D:\srcNB\6.1\main\mercurial\test\qa-functional\src\org\netbeans\test\mercurial\main\delete\DeleteUpdateTest.java D:\srcNB\6.1\main\mercurial\test\cfg-qa-functional.xml D:\srcNB\6.1\main\mercurial\test\qa-functional\src\org\netbeans\test\mercurial\utils\TestKit.java INFO: End of Commit BUT the status isn't changed. Checking it from console it is right in the IDE D:\srcNB\6.1\main\mercurial>hg status . M test\cfg-qa-functional.xml M test\qa-functional\src\org\netbeans\test\mercurial\main\commit\IgnoreTest.java M test\qa-functional\src\org\netbeans\test\mercurial\utils\TestKit.java A test\qa-functional\src\org\netbeans\test\mercurial\main\commit\CloneTest.java A test\qa-functional\src\org\netbeans\test\mercurial\main\commit\InitializeTest.java A test\qa-functional\src\org\netbeans\test\mercurial\main\delete\DeleteUpdateTest.java R test\qa-functional\src\org\netbeans\test\mercurial\main\delete\DeleteTest.java Trying to commit from commandline results in: D:\srcNB\6.1\main\mercurial>hg commit . abort: precommit.username hook is invalid (import of "hgconf.uname" failed) I would expect to detect it and notify the user via the output tab. Now it seems commit proceeded, but it did not. Using Mercurial 1.0 Product Version: NetBeans IDE Dev (Build 080428) Java: 1.5.0_15; Java HotSpot(TM) Client VM 1.5.0_15-b04 System: Windows Vista version 6.0 running on x86; Cp1252; en_GB (nb)
Now surface all abort errors for commit. We can't know what precommit messages to handle so we will just catch the abort and report this to the user in a dialog and in the output window. changeset: 80036:b8ae6684f269 tag: tip user: jrice@netbeans.org date: Wed May 14 14:50:03 2008 +0100 summary: #134924: commit failures not being reported in output, are now caught and surfaced to the user.
Created attachment 61384 [details] main_work_76928_a635212bff43-commit-aborterror2.patch
Fixed in main
Integrated into 'main-golden', available in NB_Trunk_Production #196 build Changeset: http://hg.netbeans.org/main/rev/b8ae6684f269 User: jrice@netbeans.org Log: #134924: commit failures not being reported in output, are now caught and surfaced to the user.
Reopening as I can 100% reproduce the issue on Windows Vista with mercurial 1.0 Output in IDE: Mercurial Commit ---------------- 4 Committing 1 file to repository for Mercurial: D:\srcNB\6.1\2\main\mercurial\test\qa-functional\src\org\netbeans\test\mercurial\main\archeology\AnnotationsTest.java INFO: End of Commit (but nothing is comitted) Output from console: D:\srcNB\6.1\2\main\mercurial\src>hg commit -m d No username found, using 'novakm@vista-ws' instead Attempt to commit or push text file(s) using CRLF line endings in 27ccd45c7d77: mercurial/test/qa-functional/src/org/netbeans/test/mercurial/main/archeology/AnnotationsTest.java transaction abort! rollback completed abort: pretxncommit.crlf hook failed
John's change was expecting the first line to be abort message. In your case it is the last line.
Created attachment 61749 [details] proposed patch
changeset: 81034:a4f561df673a tag: tip user: padraigob@netbeans.org date: Thu May 22 11:58:18 2008 +0100 summary: 134924: Check for abort message on last line of output from hg commit
Err, it is little embarrassing, but I am unable to reproduce the abort on the first line. I don't know what I had in my hgrc. Do you know by any chance what should be there to reproduce? :) For now I verified the second part with ABORT on the last line...
I am not sure that I have ever seen abort on the first line unless there is only one line in which case it is also the last line.
Well I had to do it somehow as it can be seen in the desc1. Probably I have wrong the name of the hook. To be honest I don't even know where to look for available hooks for our repository... I tried to use precommit.username = hgconf.uname and hgconf.uname.hook which were the only things I was able to google out, but then the output is 'hgconf.uname' is not recognized as an internal or external command, operable program or batch file. abort: precommit.username hook exited with status 1 (which is now reported correctly in IDE)
Verified. Couldn't find error message that wouldn't be handled correctly.
I've transplanted those two changesets into release61_fixes repository. changeset: 77723:15c0b3855b62 user: jrice@netbeans.org date: Wed May 14 14:50:03 2008 +0100 summary: #134924: commit failures not being reported in output, are now caught and surfaced to the user. http://hg.netbeans.org/release61_fixes/rev/15c0b3855b62 changeset: 77724:cf607695890d user: padraigob@netbeans.org date: Thu May 22 11:58:18 2008 +0100 summary: 134924: Check for abort message on last line of output from hg commit http://hg.netbeans.org/release61_fixes/rev/cf607695890d
Verified with patch2.
Haven't encountered any error that wouldn't be caught. Verified with patch2.