From: PHO Date: Mon, 19 Apr 2010 03:01:00 +0000 (+0900) Subject: Auto commit by The Sugar System. X-Git-Url: https://git.cielonegro.org/gitweb.cgi?a=commitdiff_plain;h=da2bdb1ba95b983e126c7b56742602af01482122;p=sugar.git Auto commit by The Sugar System. --- 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