]> ruderich.org/simon Gitweb - config/dotfiles.git/commitdiff
hgrc: Generate with m4 to allow different paths to hgk.
authorSimon Ruderich <simon@ruderich.org>
Fri, 1 May 2009 14:20:43 +0000 (16:20 +0200)
committerSimon Ruderich <simon@ruderich.org>
Fri, 1 May 2009 14:20:43 +0000 (16:20 +0200)
Also added Vim modeline for proper highligting and updated .gitignore to
ignore the generated file.

.gitignore
hgrc.m4 [moved from hgrc with 90% similarity]
setup.sh

index 72db1dece6eeb4651c143de45045dc850ba91d1a..c779065e3d2d46be716d045cf651f03c9cbf48c8 100644 (file)
@@ -1,2 +1,3 @@
 # Ignore generated files.
 gitconfig
+hgrc
diff --git a/hgrc b/hgrc.m4
similarity index 90%
rename from hgrc
rename to hgrc.m4
index fb4cff68e9b91095c1b03b733b5e12b16741fdb2..9fa589277d236bc36d1f85b0af8fdf6a97b1904a 100644 (file)
--- a/hgrc
+++ b/hgrc.m4
@@ -1,6 +1,9 @@
 # This is the Mercurial configuration file.
 
 
+dnl Load m4 macros.
+include(../lib.m4)
+
 [ui]
 username = Simon Ruderich <simon@ruderich.org>
 ignore = ~/.hgignore
@@ -31,7 +34,12 @@ hgext.transplant =
 
 # Necessary for hg view.
 [hgk]
+IF(OS, debian)
+path = /usr/share/mercurial/hgk
+FI
+IF(OS, darwin)
 path = /opt/local/share/mercurial/contrib/hgk
+FI
 
 [hooks]
 # Precommit hook which runs tests if they exist.
@@ -46,3 +54,5 @@ preoutgoing.mq-no-push = ! hg qtop > /dev/null 2>&1
 [pager]
 pager = colordiff | less
 ignore = record, qrecord
+
+# vim: ft=cfg
index abdbc652f51d3590d9d0e7a7f585380900e0ed8c..d07008573dc7b7bdf7a1954ea2019e15443decea 100755 (executable)
--- a/setup.sh
+++ b/setup.sh
@@ -13,6 +13,7 @@ if installed tig; then
 fi
 
 if installed hg; then
+    generate m4 hgrc -DOS=`os`
     link hgrc ~/.hgrc
     link hgignore ~/.hgignore
 fi