# HG changeset patch # User Patrick Mezard # Date 1263545452 -3600 # Node ID 8ebb34b0f6f7bb8c31c25d31db0ee7812af836e3 # Parent cd3e5c47d6631dc5eccaa5ee043ef1905ded8c8b cmdutil: expand style paths (issue1948) Fix suggested by Andrea Riciputi diff -r cd3e5c47d663 -r 8ebb34b0f6f7 mercurial/cmdutil.py --- a/mercurial/cmdutil.py Wed Jan 13 11:53:55 2010 +0100 +++ b/mercurial/cmdutil.py Fri Jan 15 09:50:52 2010 +0100 @@ -1005,7 +1005,7 @@ if tmpl: tmpl = templater.parsestring(tmpl) else: - style = ui.config('ui', 'style') + style = util.expandpath(ui.config('ui', 'style', '')) if not (tmpl or style): return changeset_printer(ui, repo, patch, opts, buffered) diff -r cd3e5c47d663 -r 8ebb34b0f6f7 tests/test-command-template --- a/tests/test-command-template Wed Jan 13 11:53:55 2010 +0100 +++ b/tests/test-command-template Fri Jan 15 09:50:52 2010 +0100 @@ -171,5 +171,18 @@ hg tag -r 5 -m t5 -d '9 0' t5 hg tag -r 3 -m at3 -d '10 0' at3 hg log --template '{rev}: {latesttag}+{latesttagdistance}\n' +cd .. + +echo '# style path expansion (issue1948)' +mkdir -p home/styles +cat > home/styles/teststyle < latesttag/.hg/hgrc <