changeset 241:e869b2f99c75

Start using `hg-prompt`.
author Ludovic Chabant <ludovic@chabant.com>
date Wed, 24 Dec 2014 15:30:57 -0800
parents 3a6b11d16a2a
children 7f9afeff086f 142625660e60
files .hgsub .hgsubstate fish/config.fish install.cmd install.sh
diffstat 5 files changed, 8 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/.hgsub	Fri Dec 12 16:53:19 2014 -0800
+++ b/.hgsub	Wed Dec 24 15:30:57 2014 -0800
@@ -34,4 +34,5 @@
 lib/hg/onsub = https://bitbucket.org/ludovicchabant/onsub
 lib/hg/allpaths = https://bitbucket.org/ludovicchabant/allpaths
 lib/hg/mercurial-cli-templates = https://bitbucket.org/sjl/mercurial-cli-templates
+lib/hg/hg-prompt = https://bitbucket.org/sjl/hg-prompt
 
--- a/.hgsubstate	Fri Dec 12 16:53:19 2014 -0800
+++ b/.hgsubstate	Wed Dec 24 15:30:57 2014 -0800
@@ -1,5 +1,6 @@
 f8703c9e2fb951ebb193b268faf7f0457abf8334 lib/hg/allpaths
-427f26764fab6ebf60cc907ae0897cf19715c92f lib/hg/hg-git
+d40de32ec5b1380ed20888c744d4f8f468fbf226 lib/hg/hg-git
+1cb3af183d2f692622f84da88d5ca18bd4f91b1f lib/hg/hg-prompt
 66e2a34005b447d321a96838d7fe2b161e78b7a9 lib/hg/mercurial-cli-templates
 d920e3425db554497a2cfaf1a2548eafbdc8b0e7 lib/hg/onsub
 db3707cbd8706f4bb054959ecc5cee82ac45687b vim/bundle/badwolf
@@ -12,7 +13,7 @@
 cae2a1c22cfd846322e3fd6506d5ade0ed58b9e3 vim/bundle/gutentags
 204e32721154766e03e99ff857bc798aa5b741dc vim/bundle/haml
 4dfa6c4e679ae326cc7486012f0433a92c64426e vim/bundle/interestingwords
-e66df94ebcebc5f806c225eb932d53a6449f39c1 vim/bundle/lawrencium
+01edb7c58e0c6d632603d5857bf0d508b9579b1d vim/bundle/lawrencium
 940a8defa0576385dee1ad177bab0b34738540aa vim/bundle/less
 b69e54f4bf0a0ee26f6582ee8764b25529610c88 vim/bundle/linediff
 409c37b205afa2f9d590e23de8171482d66770e2 vim/bundle/markdown
--- a/fish/config.fish	Fri Dec 12 16:53:19 2014 -0800
+++ b/fish/config.fish	Wed Dec 24 15:30:57 2014 -0800
@@ -49,7 +49,7 @@
 set green (set_color green)
 set gray (set_color -o black)
 set hg_promptstring "< on $magenta<branch>$normal>< at $yellow<tags|$normal, $yellow>$normal>$green<status|modified|unknown><update>$normal<
-patches: <patches|join( → )|pre_applied($yellow)|post_applied($normal)|pre_unapplied($gray)|post_unapplied($normal)>>" 2>/dev/null
+patches: <patches|join( → )|pre_applied($yellow)|post_applied($normal)|pre_unapplied($gray)|post_unapplied($normal)>>" 2>/dev/null
 
 function virtualenv_prompt
     if [ -n "$VIRTUAL_ENV" ]
@@ -58,13 +58,7 @@
 end
 
 function hg_prompt
-    if hg root >/dev/null 2>&1
-        set_color normal
-        printf ' on '
-        set_color magenta
-        printf '%s' (hg branch)
-        set_color normal
-    end
+    hg prompt --angle-brackets $hg_promptstring 2>/dev/null
 end
 
 function git_prompt
--- a/install.cmd	Fri Dec 12 16:53:19 2014 -0800
+++ b/install.cmd	Wed Dec 24 15:30:57 2014 -0800
@@ -28,6 +28,7 @@
 echo hggit = %CWD:\=/%lib/hg/hg-git/hggit/ >> "%userprofile%\mercurial.ini"
 echo onsub = %CWD:\=/%lib/hg/onsub/onsub.py >> "%userprofile%\mercurial.ini"
 echo allpaths = %CWD:\=/%lib/hg/allpaths/allpaths.py >> "%userprofile%\mercurial.ini"
+echo prompt = %CWD:\=/%lib/hg/hg-prompt/prompt.py >> "%userprofile%\mercurial.ini"
 
 :: Git Files
 if exist "%userprofile%\.gitconfig" (
--- a/install.sh	Fri Dec 12 16:53:19 2014 -0800
+++ b/install.sh	Wed Dec 24 15:30:57 2014 -0800
@@ -26,6 +26,7 @@
 echo hggit = $CWD/lib/hg/hg-git/hggit/ >> "$HOME/.hgrc"
 echo onsub = $CWD/lib/hg/onsub/onsub.py >> "$HOME/.hgrc"
 echo allpaths = $CWD/lib/hg/allpaths/allpaths.py >> "$HOME/.hgrc"
+echo prompt = $CWD/lib/hg/hg-prompt/prompt.py >> "$HOME/.hgrc"
 
 # GIT
 # ---