Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 134924 - Determining command result is wrong
Determining command result is wrong
Product: versioncontrol
Classification: Unclassified
Component: Mercurial
All Windows Vista
: P3 (vote)
: 6.x
Assigned To: issues@versioncontrol
Depends on:
  Show dependency treegraph
Reported: 2008-05-13 09:33 UTC by novakm
Modified: 2008-07-10 15:14 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT

main_work_76928_a635212bff43-commit-aborterror2.patch (1.09 KB, text/plain)
2008-05-14 14:56 UTC, John Rice
proposed patch (971 bytes, patch)
2008-05-22 12:04 UTC, Padraig Obriain
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description novakm 2008-05-13 09:33:04 UTC
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:
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\
M test\qa-functional\src\org\netbeans\test\mercurial\utils\
A test\qa-functional\src\org\netbeans\test\mercurial\main\commit\
A test\qa-functional\src\org\netbeans\test\mercurial\main\commit\
A test\qa-functional\src\org\netbeans\test\mercurial\main\delete\
R test\qa-functional\src\org\netbeans\test\mercurial\main\delete\

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)
Comment 1 John Rice 2008-05-14 14:55:15 UTC
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
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.

Comment 2 John Rice 2008-05-14 14:56:04 UTC
Created attachment 61384 [details]
Comment 3 John Rice 2008-05-14 15:12:26 UTC
Fixed in main
Comment 4 Quality Engineering 2008-05-15 04:43:41 UTC
Integrated into 'main-golden', available in NB_Trunk_Production #196 build
Log: #134924: commit failures not being reported in output, are now caught and surfaced to the user.
Comment 5 novakm 2008-05-22 11:05:43 UTC
Reopening as I can 100% reproduce the issue on Windows Vista with mercurial 1.0

Output in IDE:
Mercurial Commit
Committing 1 file to repository for Mercurial:
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/
transaction abort!
rollback completed
abort: pretxncommit.crlf hook failed
Comment 6 Padraig Obriain 2008-05-22 11:57:44 UTC
John's change was expecting the first line to be abort message. In your case it is the last line.
Comment 7 Padraig Obriain 2008-05-22 12:04:40 UTC
Created attachment 61749 [details]
proposed patch
Comment 8 Padraig Obriain 2008-05-22 12:07:12 UTC
changeset:   81034:a4f561df673a
tag:         tip
date:        Thu May 22 11:58:18 2008 +0100
summary:     134924: Check for abort message on last line of output from hg commit
Comment 9 novakm 2008-05-23 08:22:13 UTC
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...
Comment 10 Padraig Obriain 2008-05-23 08:37:30 UTC
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.
Comment 11 novakm 2008-05-23 08:57:46 UTC
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)
Comment 12 Peter Pis 2008-06-03 08:35:26 UTC
Verified. Couldn't find error message that wouldn't be handled correctly.
Comment 13 rbalada 2008-06-03 13:42:53 UTC
I've transplanted those two changesets into release61_fixes repository.

changeset:   77723:15c0b3855b62
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.

changeset:   77724:cf607695890d
date:        Thu May 22 11:58:18 2008 +0100
summary:     134924: Check for abort message on last line of output from hg commit
Comment 14 Peter Pis 2008-06-19 10:53:38 UTC
Verified with patch2.
Comment 15 Peter Pis 2008-06-19 10:56:31 UTC
Haven't encountered any error that wouldn't be caught. Verified with patch2.

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo