X-Git-Url: http://gitweb.hugovil.com/?a=blobdiff_plain;ds=sidebyside;f=scripts%2Fvs-sub;h=061911b15424c79b3858befcec6bc7fc7878dc52;hb=2088f7ccfe5a78c7410a38d725c1ff6884864429;hp=a08d1e8ab4992cf8aab28c66d007d22c2ce6141e;hpb=9f40bfdeb295a2e018e3d39251a4f2383a904c82;p=hvutilities.git diff --git a/scripts/vs-sub b/scripts/vs-sub index a08d1e8..061911b 100755 --- a/scripts/vs-sub +++ b/scripts/vs-sub @@ -1,6 +1,10 @@ #!/bin/bash set -o errexit +SCRIPT="`readlink -e $0`" +SCRIPTPATH=$(dirname ${SCRIPT}) +source ${SCRIPTPATH}/hv-hg-functions.sh + # Version control status command for all subrepositories. # For use with git-remote-hg: # http://felipec.wordpress.com/2012/11/13/git-remote-hg-bzr-2/ @@ -17,35 +21,6 @@ print_usage() echo " -m display only subrepositories with local modifications" } -# git-remote-hg doesn't work with Mercurial subpaths extension, -# so use it manually -hg_subpaths_config() -{ - subpaths=$(hg showconfig | grep "subpaths") - - if [ -n "${subpaths}" ]; then - sp_src=${subpaths//subpaths./} - sp_src=${sp_src//=*/} - sp_src=${sp_src//\\/} # Remove windows separator (LSI) - sp_dst=${subpaths//*=/} - - if [ -n "${debug}" ]; then - echo "sp_src = $sp_src" - echo "sp_dst = $sp_dst" - fi - fi -} - -display_subrepo_name() -{ - COLOR_BLUE='\033[1;34m' - COLOR_NORMAL='\033[0m' - - echo -en "${COLOR_BLUE}" - echo "[${dest}]" - echo -en "${COLOR_NORMAL}" -} - if [ "x${1}" = "x--help" ]; then print_usage exit 1