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 169006 - Mercurial->View alters my .hgrc
Summary: Mercurial->View alters my .hgrc
Status: NEW
Alias: None
Product: versioncontrol
Classification: Unclassified
Component: Mercurial (show other bugs)
Version: 6.x
Hardware: Sun All
: P3 blocker (vote)
Assignee: Ondrej Vrabec
Depends on:
Reported: 2009-07-23 02:04 UTC by ivan
Modified: 2011-10-10 18:23 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
Description ivan 2009-07-23 02:04:44 UTC
I was trying to use mercurial->View and it asked me if I wanted hgk extension
added to my .hgrc. I said yes.

Later I found that my .hgrc file had been drastically altered. Specifically,
all comments were removed. There was valuable information in those comments
like commented out alternative settings or comments about URLs
talking about specific extensions and such. Now all gone.
Comment 1 Ondrej Vrabec 2009-07-23 08:23:06 UTC
We use an external library to parse and write configuration files (ini4j) that filters out comment lines. We can't
instruct the library to leave the comments intact.
But as a workaround, i can:
1) display a warning message in the confirmation dialog - i think that would be useful, you will at least be notified
that you might loose those comments
2) always backup the latest copy of the hgrc, let's say as "originalFileName~"
3) for a commandline switch (initially disabled) we can always copy the latest version of the configuration file to a
temp directory (as originalFileName.timestamp)

Do you agree?
Comment 2 ivan 2009-07-23 21:29:44 UTC
The workarounds sound fine.
However, I know when project property files get parsed and modified the comments there
are left intact. For example inside branding.

Is the .hgrc property format that different that the same code cannot be used?
Comment 3 Tomas Stupka 2009-07-27 10:27:18 UTC
> Is the .hgrc property format that different that the same code cannot be used?
Comment 4 ivan 2011-10-10 18:23:36 UTC
(In reply to comment #1)
> We use an external library 

How about filing a bug against that external library?