config extension for mercurial February 23, 2009

I’ve written a small extension for mercurial called ‘config’.  It allows you to view and set configuration values for hg from the command-line.

Some example commands and output:

prompt> hg showconfigs
 ! /usr/etc/mercurial/hgrc
 * /etc/mercurial/hgrc
 * /etc/mercurial/hgrc.d/hgext.rc (ro)
 * /etc/mercurial/hgrc.d/mergetools.rc (ro)
 * /home/jdoe/.hgrc
 * /home/jdoe/projects/hgconfig/.hg/hgrc
prompt> hg config --verbose ui.username
values found for ui.username:
 jdoe@host  C:\Documents and Settings\jdoe\mercurial.ini
 john       d:\projects\hgconfig\src\.hg\hgrc

See more at

I would appreciate feedback so please get back to me here or on bitbucket.  This is my first mercurial extension and my first python anything.

Leave a Reply