make/scripts/hgforest.sh

changeset 462
ba77d95ed219
parent 446
dd596160b323
child 475
b85b44cced24
equal deleted inserted replaced
460:1dcb4b7b9373 462:ba77d95ed219
96 echo "Starting on ${i}" 96 echo "Starting on ${i}"
97 n=`expr ${n} '+' 1` 97 n=`expr ${n} '+' 1`
98 ( 98 (
99 ( 99 (
100 if [ "${command}" = "clone" -o "${command}" = "fclone" ] ; then 100 if [ "${command}" = "clone" -o "${command}" = "fclone" ] ; then
101 cline="hg clone ${pull_default}/${i} ${i}" 101 pull_newrepo="`echo ${pull_default}/${i} | sed -e 's@\([^:]/\)//*@\1@g'`"
102 cline="hg clone ${pull_newrepo} ${i}"
102 echo "# ${cline}" 103 echo "# ${cline}"
103 ( eval "${cline}" ) 104 ( eval "${cline}" )
104 else 105 else
105 cline="hg $*" 106 cline="hg $*"
106 echo "# cd ${i} && ${cline}" 107 echo "# cd ${i} && ${cline}"
119 for i in ${repos_extra} ; do 120 for i in ${repos_extra} ; do
120 echo "Starting on ${i}" 121 echo "Starting on ${i}"
121 n=`expr ${n} '+' 1` 122 n=`expr ${n} '+' 1`
122 ( 123 (
123 ( 124 (
124 cline="hg clone ${pull_extra}/${i} ${i}" 125 pull_newextrarepo="`echo ${pull_extra}/${i} | sed -e 's@\([^:]/\)//*@\1@g'`"
126 cline="hg clone ${pull_newextrarepo} ${i}"
125 echo "# ${cline}" 127 echo "# ${cline}"
126 ( eval "${cline}" ) 128 ( eval "${cline}" )
127 echo "# exit code $?" 129 echo "# exit code $?"
128 ) > ${tmp}/repo.${n} 2>&1 ; cat ${tmp}/repo.${n} ) & 130 ) > ${tmp}/repo.${n} 2>&1 ; cat ${tmp}/repo.${n} ) &
129 if [ `expr ${n} '%' ${at_a_time}` -eq 0 ] ; then 131 if [ `expr ${n} '%' ${at_a_time}` -eq 0 ] ; then

mercurial