Advise on cmd line templates

Vadim Gelfer vadim.gelfer at gmail.com
Wed Mar 22 07:32:56 UTC 2006


On 3/21/06, Vadim Gelfer <vadim.gelfer at gmail.com> wrote:

> i think adding indent is okay, but reformat should be job of external
> program like fmt.

never mind. i found textwrap module in standard library.

i have put changelog style in crew. changes were only 73 lines of
code. here is example output.

2006-03-21  Thomas Arendsen Hein  <thomas at intevation.de>  (c577689006fa)

        * (doc/hgrc.5.txt, mercurial/ui.py):
        Adapted behaviour of ui.username() to documentation and mention it
        explicitly: Searched in this order: $HGUSER, [ui] section of hgrcs,
        $EMAIL and stop searching if one of these is set. Abort if found
        username is an empty string to force specifying the commit user
        elsewhere, e.g. with line option or repo hgrc. If not found, use
        $LOGNAME or $USERNAME +"@full.hostname".

2006-03-21  Thomas Arendsen Hein  <thomas at intevation.de>  (df7436f439a0)

        * (mercurial/ui.py):
        Improved ui.edit():
        - Use descriptive name for temporary file: hg-editor-*.txt
        - Don't import tempfile in the method, but use demandload()
        - Remove tempfile file even if editor aborts.




More information about the Mercurial mailing list