Merge with crew-stab le
authorPatrick Mezard <pmezard@gmail.com>
Fri, 15 Jan 2010 10:38:11 +0100
changeset 10250 af24805aa37c
parent 10248 4441e8d7f04f (current diff)
parent 10249 8ebb34b0f6f7 (diff)
child 10252 0bc93fa2cf2b
Merge with crew-stab le
mercurial/cmdutil.py
tests/test-command-template
tests/test-command-template.out
--- a/mercurial/cmdutil.py	Thu Jan 14 16:43:14 2010 +0100
+++ b/mercurial/cmdutil.py	Fri Jan 15 10:38:11 2010 +0100
@@ -891,7 +891,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	Thu Jan 14 16:43:14 2010 +0100
+++ b/tests/test-command-template	Fri Jan 15 10:38:11 2010 +0100
@@ -181,5 +181,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'
--- a/tests/test-command-template.out	Thu Jan 14 16:43:14 2010 +0100
+++ b/tests/test-command-template.out	Fri Jan 15 10:38:11 2010 +0100
@@ -1064,4 +1064,6 @@
 2: t2+0
 1: t1+0
 0: null+1
+# style path expansion (issue1948)
+test 10:dee8f28249af
 # done