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 255202 - Error when hgrc file contains an %include directive
Summary: Error when hgrc file contains an %include directive
Status: NEW
Alias: None
Product: versioncontrol
Classification: Unclassified
Component: Mercurial (show other bugs)
Version: 8.2
Hardware: PC Linux
: P3 normal with 1 vote (vote)
Assignee: Ondrej Vrabec
: 215440 (view as bug list)
Depends on:
Reported: 2015-09-11 08:04 UTC by ricktw
Modified: 2017-11-16 10:11 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:

error message (9.03 KB, image/png)
2015-09-11 08:04 UTC, ricktw

Note You need to log in before you can comment on or make changes to this bug.
Description ricktw 2015-09-11 08:04:45 UTC
Created attachment 156084 [details]
error message

When the .hg/hgrc file contains a '%include' directive, Netbeans displays this error:

"No default Pull path set for this project"

hgrc file:
%include ../mandatory.hgrc
default = http://username@repo
default-pull = http://username@repo

pretxncommit.msglen = if test `hg tip --template {desc} | wc -c` -ge 20; then exit 0; else echo 'too short commit message (min 20)'; exit 1; fi
Comment 1 ricktw 2015-09-11 09:13:55 UTC
You need to flush the cache (~/.cache/netbeans) and restart Netbeans in order to reproduce this issue.
Comment 2 Ondrej Vrabec 2015-09-11 10:07:05 UTC
*** Bug 215440 has been marked as a duplicate of this bug. ***
Comment 3 Ondrej Vrabec 2015-09-11 10:14:40 UTC
right, we do not support %includes.
Comment 4 ricktw 2015-09-11 11:20:05 UTC
... and are not planning to?
Maybe this bug should change to enhancement then?
Comment 5 Ondrej Vrabec 2015-09-11 11:37:45 UTC
(In reply to ricktw from comment #4)
> ... and are not planning to?
well... not really. We'd need to write our own parser for hg config files, currently we use ini4j parser which is not that competent.
How often do you think people use %include directives? For the last several years we've had just two complaints about this, so i am not sure how critical this is to resolve.
Comment 6 PhoneixS 2017-11-16 10:10:16 UTC
I think this should be done. Maybe you don't need to parse the imported file, but at least you should ignore the line so it parses the rest of the file.

Nowadays if the file has a '%include' you can't change the Mercurial Team properties because it can't save the changes back to the file. So although it doesn't affect many people, when it affects, it's very disturbing.