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 130508 - Do not replace username set in Mercurial.ini
Summary: Do not replace username set in Mercurial.ini
Status: VERIFIED DUPLICATE of bug 126803
Alias: None
Product: versioncontrol
Classification: Unclassified
Component: Mercurial (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: issues@versioncontrol
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-03-19 12:28 UTC by Jiri Skrivanek
Modified: 2008-03-20 13:14 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jiri Skrivanek 2008-03-19 12:28:36 UTC
I have username set in my Mercurial.ini. I don't want IDE to replace my settings by some fake values.
Comment 1 novakm 2008-03-19 12:40:03 UTC
Please verify that it is the only Mercurial.ini and you don't have username set in your project's hgrc. See issue
#126803 for details.
Comment 2 Jiri Skrivanek 2008-03-19 13:05:37 UTC
No, I don't have username set in hgrc. It is set only in E:\Program Files\Mercurial\Mercurial.ini.
Comment 3 novakm 2008-03-19 13:21:49 UTC
  Are you absolutely sure that you don't have any other Mercurial.ini elsewhere? I had one in
%USERPROFILE%\mercurial.ini (with username <login>@<hostname>) I was not aware of and that location is checked before
that in Program Files... 
  It works for me. If there is no [ui] section with username in your hgrc and the only Mercurial.ini you have is in your
install location, username from there is used. Another thing is that if you invoke Mercurial | Properties shows still
the <login>@<hostname> as username, but if you commit, the one from Mercurial.ini is used. This was also reported in
issue #126803 
Comment 4 Padraig Obriain 2008-03-19 14:22:44 UTC
John has attached a patch to #126803 which is not yet committed.

Does applying that patch fix the problem you are having?
Comment 5 Jiri Skrivanek 2008-03-19 14:23:23 UTC
So, I did the following:

- start IDE with empty userdir
- open some nb project
- modify some file
- commit changes using IDE. When I try 'hg out' I see 

user:        js103526 <js103526@jskrivanek-nb>

But I have only one E:\Program Files\Mercurial\Mercurial.ini, nothing in hgrc. If I open 'Mercurial|Properties' there is
also 'username  js103526 <js103526@jskrivanek-nb>' by default.

Product Version: NetBeans IDE Dev (Build 20080319053641)
Java: 1.6.0_05; Java HotSpot(TM) Client VM 10.0-b19
System: Windows XP version 5.1 running on x86; Cp1250; cs_CZ (nb)

Comment 6 novakm 2008-03-20 11:20:15 UTC
I stopped at jskrivanek's place and identified the problem. There was hgrc placed in %APPDATA% created through options.
This issue is thus duplicate as I mentioned before. However, the behavior of options and determining the username is not
very clear and I will file another issue for that.

*** This issue has been marked as a duplicate of 126803 ***
Comment 7 Jiri Skrivanek 2008-03-20 13:14:47 UTC
Yes, the problem was I opened Options and click OK. It creates mentioned APPDATA/Mercurial/hgrc. IMO, there should not
be any default value for username property and only when user change it to something reasonable it should take precedenc
before Mercurial.ini and other hgrc. Also it should be stored into the userdir and not globally in APPDATA.