common/bin/hgforest.sh

changeset 1133
50aaf272884f
parent 902
d832f6171acd
parent 1
2bcf2a10b799
child 1288
7801df19942d
     1.1 --- a/common/bin/hgforest.sh	Wed Sep 17 11:23:18 2014 -0700
     1.2 +++ b/common/bin/hgforest.sh	Thu Aug 31 15:40:18 2017 +0800
     1.3 @@ -23,6 +23,12 @@
     1.4  # questions.
     1.5  #
     1.6  
     1.7 +#
     1.8 +# This file has been modified by Loongson Technology in 2013. These
     1.9 +# modifications are Copyright (c) 2013 Loongson Technology, and are made
    1.10 +# available on the same license terms set forth above.
    1.11 +#
    1.12 +
    1.13  # Shell script for a fast parallel forest command
    1.14  command="$1"
    1.15  pull_extra_base="$2"
    1.16 @@ -144,7 +150,9 @@
    1.17    (
    1.18      (
    1.19        if [ "${command}" = "clone" -o "${command}" = "fclone" ] ; then
    1.20 -        pull_newrepo="`echo ${pull_base}/${i} | sed -e 's@\([^:]/\)//*@\1@g'`"
    1.21 +        # 2013.2.27 Jin: fix the repo url for ssh
    1.22 +        #pull_newrepo="`echo ${pull_base}/${i} | sed -e 's@\([^:]/\)//*@\1@g'`"
    1.23 +        pull_newrepo=${pull_base}/$i
    1.24          echo hg clone ${pull_newrepo} ${i}
    1.25          path="`dirname ${i}`"
    1.26          if [ "${path}" != "." ] ; then
    1.27 @@ -158,13 +166,13 @@
    1.28              sleep 5
    1.29            done
    1.30          fi
    1.31 -        (PYTHONUNBUFFERED=true hg clone ${pull_newrepo} ${i}; echo "$?" > ${tmp}/${repopidfile}.pid.rc )&
    1.32 +        (PYTHONUNBUFFERED=true hg clone ${pull_newrepo} ${i}; echo "$?" > ${tmp}/${repopidfile}.pid.rc )
    1.33        else
    1.34          echo "cd ${i} && hg $*"
    1.35 -        cd ${i} && (PYTHONUNBUFFERED=true hg "$@"; echo "$?" > ${tmp}/${repopidfile}.pid.rc )&
    1.36 +        cd ${i} && (PYTHONUNBUFFERED=true hg "$@"; echo "$?" > ${tmp}/${repopidfile}.pid.rc )
    1.37        fi
    1.38        echo $! > ${tmp}/${repopidfile}.pid
    1.39 -    ) 2>&1 | sed -e "s@^@${reponame}:   @") &
    1.40 +    ) 2>&1 | sed -e "s@^@${reponame}:   @") 
    1.41  
    1.42    if [ `expr ${n} '%' ${at_a_time}` -eq 0 ] ; then
    1.43      sleep 2

mercurial