From da2bdb1ba95b983e126c7b56742602af01482122 Mon Sep 17 00:00:00 2001 From: PHO Date: Mon, 19 Apr 2010 12:01:00 +0900 Subject: [PATCH] Auto commit by The Sugar System. --- dot-files/_hgrc | 5 +++++ dot-files/_zshrc | 7 ++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/dot-files/_hgrc b/dot-files/_hgrc index b45ff80..e77aec1 100644 --- a/dot-files/_hgrc +++ b/dot-files/_hgrc @@ -13,3 +13,8 @@ hgext.fetch = hgext.graphlog = #pager= color= + +[hooks] +commit = touch `hg root`/.hg/unpushed +post-push = rm -f `hg root`/.hg/unpushed +post-rollback = rm -f `hg root`/.hg/unpushed diff --git a/dot-files/_zshrc b/dot-files/_zshrc index 710f259..487f03e 100644 --- a/dot-files/_zshrc +++ b/dot-files/_zshrc @@ -95,7 +95,12 @@ function print_directory_info() { elif [[ -r $absdir/.hg/branch ]] then # Hg - cat $absdir/.hg/branch + local hgbranch=`cat $absdir/.hg/branch` + if [[ -e $absdir/.hg/unpushed ]] then + echo "*${hgbranch}*" + else + echo "$hgbranch" + fi elif [[ -d $absdir/_darcs ]] then # Darcs -- 2.40.0