Hi,

   I was trying to colourify the output of hg commands with a style (Style 
file attached).

   Looks like hg recognizes some keywords for which we can customize. 
Even the 'start_*' accepts only these keywords.

   I'm not able to declare my own variables.  The attached style file 
appears garbled due to lot of control characters and other characters 
which are not printed.

   Is there any way to declare my own variables and assign values to it 
which can be used in the changeset_* lines?

   I want to say something like:

changeset = '{blueS}{rev}{blueE}{tags}...}

blueS = '^[[36m'
blueE = '^[[0m'

   This will also allow some more customizations.

Regards,
~Kini

-- 
Sun Microsystems - India Engineering Centre
http://blogs.sun.com/jkini
-------------- next part --------------
#header = 
'----------------------------------------------------------------------------------\n'

changeset = '{rev}{tags}{parents}    {date|shortdate}   
{author|email}\n{desc}\n\n'
changeset_verbose = '{rev}{tags}{parents}    {node|short}   
{date|shortdate}   {author|email}\n{desc}\n 
{file_adds|stringify|fill68|tabindent}{file_dels|stringify|fill68|tabindent}{file_mods|stringify|fill68|tabindent}\n'
changeset_quiet = '{rev}:{node|short}\n'
changeset_debug = '{rev}{tags}{parents}    {node|short}   {date|shortdate}   
{author|email}\n{desc}\n 
{file_adds|stringify|fill68|tabindent}{file_dels|stringify|fill68|tabindent}{file_mods|stringify|fill68|tabindent}\n'

start_tags = '['
tag = '{tag},'
last_tag = '{tag}]'

start_parents = ':'
parent = '{rev},'
last_parent = '{rev}'

start_file_adds = 'New Files: '
file_add = '{file_add}, '
last_file_add = '{file_add}\n '
start_file_dels = 'Files Deleted: '
file_del = '{file_del}, '
last_file_del = '{file_del}\n '
start_file_mods = 'Modified Files: '
file_mod = '{file_mod}, '
last_file_mod = '{file_mod}\n '

#footer = 
'----------------------------------------------------------------------------------\n'

Reply via email to