]> gitweb @ CieloNegro.org - sugar.git/commitdiff
Auto commit by The Sugar System.
authorPHO <pho@cielonegro.org>
Mon, 19 Apr 2010 03:01:00 +0000 (12:01 +0900)
committerPHO <pho@cielonegro.org>
Mon, 19 Apr 2010 03:01:00 +0000 (12:01 +0900)
dot-files/_hgrc
dot-files/_zshrc

index b45ff801e3809909041dcdeb7cd12b5b7f2b9df7..e77aec1e726b8778d76bb243b2956244d835ea48 100644 (file)
@@ -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
index 710f2590c1fcf04ef13e734d4e8df127cfdc3242..487f03e3545dff02409ad18552810159d951e494 100644 (file)
@@ -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