Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 132984 - Unable to commit file after merge
Unable to commit file after merge
Product: versioncontrol
Classification: Unclassified
Component: Mercurial
All All
: P2 (vote)
: 6.x
Assigned To: issues@versioncontrol
Depends on:
  Show dependency treegraph
Reported: 2008-04-16 11:44 UTC by novakm
Modified: 2008-06-04 08:37 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT

Output from command line (1.24 KB, text/plain)
2008-04-16 11:47 UTC, novakm
var/log/messages (57.66 KB, text/plain)
2008-04-16 11:48 UTC, novakm
Output in tab from IDE (1.57 KB, text/plain)
2008-04-16 11:49 UTC, novakm
Mercurial.ini (2.46 KB, text/plain)
2008-04-23 12:06 UTC, novakm
main_work_76928_a635212bff43-commit-after-merge.patch (5.97 KB, text/plain)
2008-04-23 18:04 UTC, John Rice

Note You need to log in before you can comment on or make changes to this bug.
Description novakm 2008-04-16 11:44:37 UTC
I was following Test specifications at and in test case "Merge" there is reproducible
problem (at least for me on Vista) that after merge the is marked as modified, but when I want to commit it,
nothing happens. According to the message in output tab the commit was performed (text from output tab attached), but
the file is still marked as modified even after refresh status. Invoking diff from IDE shows no difference, from
commandline it shows like it was new. Command line also says it is modified, however if I try to commit from the command
line, the commit proceeds and IDE reflects it after refresh status.

Using Mercurial 1.0 from selenic - version 1e4ddc9ac9f7+20080325

Product Version: NetBeans IDE 6.1 RC2 (Build 200804160006)
Java: 1.6.0_05; Java HotSpot(TM) Client VM 10.0-b19
System: Windows Vista version 6.0 running on x86; Cp1252; en_GB (nb)
Comment 1 novakm 2008-04-16 11:47:32 UTC
Created attachment 60262 [details]
Output from command line
Comment 2 novakm 2008-04-16 11:48:22 UTC
Created attachment 60263 [details]
Comment 3 novakm 2008-04-16 11:49:01 UTC
Created attachment 60264 [details]
Output in tab from IDE
Comment 4 novakm 2008-04-22 10:32:29 UTC
I've digged into this problem with Peter and we've found the cause. In the log there is
FINE execEnv(): [C:\Program Files\Mercurial\hg.exe, commit, --repository,
D:\install\6.1rc2_200804160006_javase\projects\JavaApplication11_clone0, --cwd,
D:\install\6.1rc2_200804160006_javase\projects\JavaApplication11_clone0, --logfile,
C:\Users\novakm\AppData\Local\Temp\hgcommit21068.hgm, src\javaapplication11\]
which is in violation with following quotation from hg help commit:
"If you are committing the result of a merge, do not provide any file names or -I/-X filters."

That means that users won't be able to commit anything after merge from IDE. Since merge is needed nearly all the time
in typical workflow, this is quite serious. Workaround is to use fetch, but if it fails, you are in the same situation
and have to resolve this from console using hg commit.
Comment 5 John Rice 2008-04-23 10:47:36 UTC
Martin I've tested this on nevada and its working fine. I am running Mercurial 0.9.5. Also when I check "hg -v help
commit" I see no mention of the requirement you list below, "do not provide any file names or -I/-X filters."

You appear to be running one of the unofficial or head builds. Can you try this with the official 0.9.5 and 1.0 releases.

I'll try it on nevada with 1.0 and see how it goes.
Comment 6 John Rice 2008-04-23 10:58:38 UTC
Martin - just put Mercurial 1.0 on nevada and now see the warning:
    "If you are committing the result of a merge, do not provide any
    file names or -I/-X filters."

So this has changed from 0.9.5. I should be able to reproduce the problem now.

Comment 7 novakm 2008-04-23 11:05:19 UTC
Well I am using official 1.0 client binaries downloaded from

C:\Users\novakm>hg --version
Mercurial Distributed SCM (version 1e4ddc9ac9f7+20080325)

Copyright (C) 2005-2008 Matt Mackall <> and others
This is free software; see the source for copying conditions. There is NO

C:\Users\novakm>hg -v help commit
hg commit [OPTION]... [FILE]...

aliases: ci

commit the specified files or all outstanding changes

    Commit changes to the given files into the repository.

    If a list of files is omitted, all changes reported by "hg status"
    will be committed.

    If you are committing the result of a merge, do not provide any
    file names or -I/-X filters.

    If no commit message is specified, the configured editor is started to
    enter a message.

    See 'hg help dates' for a list of formats valid for -d/--date.
Comment 8 John Rice 2008-04-23 11:19:42 UTC
Can't reproduce it on nevada. The file gets committed and its status is changed to up to date. Show History
displays the commit as expected for the file. Will try this on Windows XP. I don't have Vista available.
Comment 9 John Rice 2008-04-23 11:38:22 UTC
What I see for my version number is as follows, 

$ hg --version
Mercurial Distributed SCM (version 1.0)

Copyright (C) 2005-2008 Matt Mackall <> and others
This is free software; see the source for copying conditions. There is NO

So not sure what you have on the system. Is this the link you used to download the binary?
Comment 10 novakm 2008-04-23 11:46:18 UTC
That is really strange as I would expect the same problem according to the stating that you must not provide any file
name. From the log it seems you are, or aren't you? Anyway, I can reproduce on Vista and Peter can reproduce it on
Windows XP (though he has RC1 of tortoiseHg0.4 I think).

Yes that's the link I used. I presume most users on windows will use the same client as it is latest version and is
referred from the Selenic wiki.
Comment 11 John Rice 2008-04-23 11:53:59 UTC
Martin - I am providing the explicit filename on nevada and it does work, which as you say is strange. I've just
upgraded to Mercurial 1.0.

I am getting setup on XP to test it and hopefully reproduce so I can fix it. Are you using kdiff3 for your merge tool.
Can you attach your Mercurial.ini so I can see how you have set things up. Thanks.
Comment 12 novakm 2008-04-23 12:05:08 UTC
Attaching my Mercurial.ini. I neither did touch it in any way (it was like this after installation) nor have any other
hgrc or Mercurial.ini with [merge-tools] sections. 

Note that I don't have kdiff3 on PATH whereas I have gvim. However, merging with gvim does not work (I suspect it tries
to create some temporary files somewhere where Vista don't let it). Nevertheless, no merging (at least visual) is used
in this scenario. I'll try to setup correct path to kdiff3.
Comment 13 novakm 2008-04-23 12:06:25 UTC
Created attachment 60598 [details]
Comment 14 novakm 2008-04-23 13:50:05 UTC
I've just tested with Mercurial 0.9.5 and it works as expected. Same with TortoiseHg 0.3. It does not work with
TortoiseHg 0.4 RC1 and Mercurial 1.0 on both Windows XP and Vista. I still wonder why it works on Nevada...
Comment 15 John Rice 2008-04-23 14:21:12 UTC
Just got this working on XP and I see the bug:

>C:\Mercurial\hg.exe commit --repository "C:\Documents and Settings\John\My
Documents\test\test2\JavaApplication5_clone0" --cwd  "C:\Documents and Settings\John\My
--logfile "C:\DOCUME~1\John\LOCALS~1\Temp\hg.txt" "src\javaapplication5\"
abort: cannot partially commit a merge (do not specify files or patterns)

I also noticed that the first push fails but does not pop up a dialog:
"abort: push creates new remote heads!"
Looks like some of the error messages we are responding too have changed in Mercurial 1.0, I'll need to audit all of
them to make sure there aren't others lurking around.
Comment 16 John Rice 2008-04-23 18:04:02 UTC
Found a  few issues here all related to the Hg 1.0 upgrade:

1. Incorrectly reporting files as added and modified in same changeset
2. Change of error string, "abort: push creates new remote heads" instead of "abort: push creates new remote branches"
3. New restriction whereby you cannot commit using explicit file names after a merge.

Will attach a proposed patch.
Comment 17 John Rice 2008-04-23 18:04:55 UTC
Created attachment 60615 [details]
Comment 18 John Rice 2008-04-23 19:39:55 UTC
Committed to main:

changeset:   79019:312642732ef3
tag:         tip
date:        Wed Apr 23 18:03:13 2008 +0100
summary:     #132984: issues with commit after merge
Comment 19 John Rice 2008-04-23 19:48:52 UTC
Submitted for review
Comment 20 Quality Engineering 2008-04-24 03:53:13 UTC
Issue '132984' Integrated in NB_Trunk_Production #154 :,
 with comment: #132984: issues with commit after merge
Comment 21 Marian Mirilovic 2008-04-24 08:47:53 UTC
too late for integration to NB 6.1 - scheduling for Patch 1
Comment 22 Peter Pis 2008-04-24 09:28:53 UTC
Verified in trunk.
Comment 23 rbalada 2008-04-25 17:03:32 UTC
Merged into release61_fixes repository

changeset:   77449:ae6d9632981a
tag:         tip
user:        Rudolf Balada <>
date:        Fri Apr 25 17:54:28 2008 +0200
summary:     #132984 Unable to commit file after merge
Comment 24 Peter Pis 2008-05-19 11:11:42 UTC
Verified on Patch1.

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