Mercurial > hg
changeset 10249:8ebb34b0f6f7 stable
cmdutil: expand style paths (issue1948)
Fix suggested by Andrea Riciputi <andrea.riciputi@gmail.com>
author | Patrick Mezard <pmezard@gmail.com> |
---|---|
date | Fri, 15 Jan 2010 09:50:52 +0100 |
parents | cd3e5c47d663 |
children | af24805aa37c a19d2993385d |
files | mercurial/cmdutil.py tests/test-command-template tests/test-command-template.out |
diffstat | 3 files changed, 16 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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)
--- 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 <<EOF +changeset = 'test {rev}:{node|short}\n' +EOF +HOME=`pwd`/home; export HOME +cat > latesttag/.hg/hgrc <<EOF +[ui] +style = ~/styles/teststyle +EOF +hg -R latesttag tip echo '# done'