Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
Bug 131794 - Determining default paths
Determining default paths
Status: VERIFIED FIXED
Product: versioncontrol
Classification: Unclassified
Component: Mercurial
6.x
All Windows Vista
: P3 (vote)
: 6.x
Assigned To: issues@versioncontrol
issues@versioncontrol
61fixes1-fixed
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-04-02 08:53 UTC by novakm
Modified: 2008-06-04 08:36 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
:


Attachments
main_work_76920_208cabf1e10e-mercurial-properties-syspaths.patch (12.70 KB, text/plain)
2008-04-02 11:39 UTC, John Rice
Details

Note You need to log in before you can comment on or make changes to this bug.
Description novakm 2008-04-02 08:53:00 UTC
If you don't have default-pull / default-push specified and invoke show incomming / out and press search, it takes
forever although it does not make sense. The user should be warned that he has to provide repository path.

This is in log after such call
FINE [org.netbeans.modules.mercurial]: Start - Searching...
FINE [org.netbeans.modules.mercurial]: execEnv(): [C:\Program Files\TortoiseHg\hg.exe, incoming, --repository,
D:\install\6.1_200804020004_javase\proj
ects\hgusername_clone0, --debug, --rev, tip,
--template=rev:{rev}\nauth:{author}\ndesc:{desc}\ndate:{date|hgdate}\nid:{node|short}\nfile_mods:{files}\
nfile_adds:{file_adds}\nfile_dels:{file_dels}\nfile_copies:\nendCS:\n]

Product Version: NetBeans IDE Dev (Build 200804020004)
Comment 1 Padraig Obriain 2008-04-02 09:04:18 UTC
On Solaris if I call "hg incoming" when paths are not set the error below is reported

bash-3.2$ hg incoming
abort: repository default not found!


What happens on Windows?
Comment 2 novakm 2008-04-02 09:29:04 UTC
  Now I know what happened. It took the default path from per-installation or per-user Mercurial.ini which was set to
default = http://hg.netbeans.org/main/. But it was not displayed in mercurial properties on that project so I didn't
expect it to do so. The progress bar was indicating something is happening and finally (after several minutes when I was
away from my computer) it resulted in error because the line was too long.
  Now I see the command line behaves the same. So the problem is that it is unsafe to have these paths elsewhere than in
hgrc of that repository, is that right? Nothing that can be fixed on our side except maybe a warning dialog that the
path was not taken from per-project hgrc?
Comment 3 John Rice 2008-04-02 10:26:50 UTC
Martin - when you brought up the Mercurial Properties dialog, you should get the push/ pull paths that will be used for
this repository, either in the .hg/hgrc, %UserProfile%\Mercurial.ini, or <Install Hg>\Mercurial.ini

If you see nothing when .hg\hgrc is not setm but the path is being pulled from %UserProfile%\Mercurial.ini, or <Install
Hg>\Mercurial.ini then that's a bug to my mind. 

We check to see if the push path is null before doing hte push and if it is null warn the user. We also output the push
path that was used after the push command completes. I think we should add a "Pushing to <path> ...." in the output
window to let the user know what's happening.
Comment 4 John Rice 2008-04-02 10:38:02 UTC
Confirmed on Solaris:

Have nothing set in .hg/hgrc and set default and default-push in ~/.hgrc and you do not see anything in
Mercurial->Properties, you should see the paths set in ~/.hgrc
Comment 5 novakm 2008-04-02 10:42:58 UTC
That's what I thought. But as I said, default-push and pull is empty (even though username is not) in properties. I've
just noticed following text in log:

FINE [org.netbeans.modules.mercurial]: Start - Scanning mercurial properties
WARNING [org.netbeans.modules.mercurial]: Could not load the file
D:\install\6.1_200804020004_javase\projects\hgusername_clone0\.hg\hgrc. Falling back
 on hg defaults.
WARNING [org.netbeans.modules.mercurial]: Could not load the file C:\Users\novakm\Mercurial.ini. Falling back on hg
defaults.
WARNING [org.netbeans.modules.mercurial]: Could not load the file C:\Users\novakm\Mercurial.ini. Falling back on hg
defaults.
FINE [org.netbeans.modules.mercurial]: End - Scanning mercurial properties

Indeed, there is no %USERPROFILE%\Mercurial.ini, but obviously it uses per-installation file and does not display the
values in properties editor.
Comment 6 John Rice 2008-04-02 11:39:38 UTC
Created attachment 59535 [details]
main_work_76920_208cabf1e10e-mercurial-properties-syspaths.patch
Comment 7 John Rice 2008-04-02 11:43:29 UTC
Now fetching sys/global paths if local .hg/hgrc paths have not been set, for display in Mercurial->Properties. Also
outputing paths at start of Push/Pull.


Committed to main:

changeset:   77036:689110f7a019
tag:         tip
user:        jrice@netbeans.org
date:        Wed Apr 02 11:36:48 2008 +0100
summary:     #131794: in Mercurial->Properties only checking .hg/hgrc for Push/Pull need to check system/ global as well

Comment 8 novakm 2008-04-09 11:13:24 UTC
Verified in build 200804090003
Comment 9 rbalada 2008-04-25 17:01:41 UTC
Merged into release61_fixes repository

changeset:   77447:ba293092e4c1
user:        jrice@netbeans.org
date:        Wed Apr 02 11:36:48 2008 +0100
summary:     #131794: in Mercurial->Properties only checking .hg/hgrc for pUsh/Pull need to check system/ global as well


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