changeset 593:d88425a757d6

Add option to print if local changes present.
author Oleksandr Gavenko <gavenkoa@gmail.com>
date Sat, 21 Nov 2015 23:19:14 +0200
parents 242d4955e902
children 6fdcc066ec68
files hg/hgsyncew
diffstat 1 files changed, 15 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/hg/hgsyncew	Sat Nov 21 23:10:50 2015 +0200
+++ b/hg/hgsyncew	Sat Nov 21 23:19:14 2015 +0200
@@ -19,6 +19,7 @@
     echo "$UTIL_NAME [--help | --push]"
     echo "  --help    print this help"
     echo "  --push    back changeset to master repo set"
+    echo "  --modified  print if local changes present"
 }
 
 PrintLog() {
@@ -121,6 +122,16 @@
 
 NEED_PUSH=n
 
+modified() {
+    for dir in */.hg/. .*/.hg/.; do
+        dir=${dir%/.hg/.}
+        [ -d "$dir" ] || continue
+        MSG="'$dir' repo."
+        PrintLog PROCESSING
+        hg -R ./$dir status -m -a -r -d
+    done
+}
+
 case "${1-}" in
     -h|--help)
         Usage
@@ -129,6 +140,10 @@
     --push)
         NEED_PUSH=y
         ;;
+    --modified)
+        modified
+        exit 0
+        ;;
 esac
 
 RotateLog