Suffering from CVS mindset

Greg Ward greg-hg at gerg.ca
Tue Apr 20 15:20:49 CDT 2010


On Mon, Apr 19, 2010 at 12:21 PM, Haszlakiewicz, Eric
<EHASZLA at transunion.com> wrote:
> ugh!  If it doesn't work, it should say so!
>
> I'm about to create an issue in the bug tracker for this.  I'm thinking of creating a patch to: 1) add a comment to the map-cmdline.default file to explain that it's not used, 2) explain the caveat with the default style, 3) add cross references within the man page to the map-* files and hg help.

+1.  Doc improvements are always welcome, and the docs for --style are
not up to scratch (IMHO).

> However, first I have a somewhat related question:  the various command line options don't explain when they take a parameter.  e.g.:
>              --style
>                     display using template map file
> doesn't say that there is supposed to be a file name specified.  Is that on on purpose?  I would find the docs much easier to understand if they followed the convention used in many other places of having that level of details.  i.e. the above would seem better as:
>              --style <mapfile>
>                     display using template map file.  See the
>                     TEMPLATE USAGE section below for details.
> Would the above be an acceptable change?

Unfortunately, it appears that hg's option-parsing library does not
support that style, where the option is accompanied by a placeholder
for the value it takes.  ;-(  At least I don't see any evidence of
that style in various command's help output.

>>What you *really* want to do is put
>>
>>  [ui]
>>  style = <filename>
>>
>>in your ~/.hgrc, where <filename> is the path to the style file I posted.
>
> Actually, what I really want is to make that the default system-wide for everyone, but it appears that I can do that by creating a file in the <install-dir>/etc/hgrc.d directory.  (yes, that'll be clobbered by the next upgrade, but we keep detailed instructions about how to install things, so adding files to the hgrc.d directory will be remembered)

I keep our site-wide customizations in
/etc/mercurial/hgrc.d/<companyname>.rc.  That file gets deployed to
everyone's workstation by an RPM that I maintain and release
occasionally.  Works pretty well as long as everyone runs a
Red-Hat-ish OS.  I have some work to do to support other Linuxes.

Greg


More information about the Mercurial mailing list