< prev index next >

common/bin/hgforest.sh

Print this page




 292       cwd=`pwd`
 293       serving=`basename ${cwd}`
 294       (
 295         echo "[web]"
 296         echo "description = ${serving}"
 297         echo "allow_push = *"
 298         echo "push_ssl = False"
 299 
 300         echo "[paths]"
 301         for i in ${repos} ; do
 302           if [ "${i}" != "." ] ; then
 303             echo "/${serving}/${i} = ${i}"
 304           else
 305             echo "/${serving} = ${cwd}"
 306           fi
 307         done
 308       ) > ${tmp}/serve.web-conf
 309 
 310       echo "serving root repo ${serving}" > ${status_output}
 311 
 312       echo "hg${global_opts} serve" > ${status_output}
 313       (PYTHONUNBUFFERED=true hg${global_opts} serve -A ${status_output} -E ${status_output} --pid-file ${tmp}/serve.pid --web-conf ${tmp}/serve.web-conf; echo "$?" > ${tmp}/serve.pid.rc ) 2>&1 &
 314     ) 2>&1 | sed -e "s@^@serve:   @" > ${status_output}
 315   ) &
 316 else
 317   # Run the supplied command on all repos in parallel.
 318 
 319   # n is the number of subprocess started or which might still be running.
 320   n=0
 321   if [ ${have_fifos} = "true" ]; then
 322     # if we have fifos use them to detect command completion.
 323     mkfifo ${tmp}/fifo
 324     exec 3<>${tmp}/fifo
 325   fi
 326 
 327   # iterate over all of the subrepos.
 328   for i in ${repos} ${repos_extra} ; do
 329     n=`expr ${n} '+' 1`
 330     repopidfile=`echo ${i} | sed -e 's@./@@' -e 's@/@_@g'`
 331     reponame=`echo ${i} | sed -e :a -e 's/^.\{1,20\}$/ &/;ta'`
 332     pull_base="${pull_default}"
 333 




 292       cwd=`pwd`
 293       serving=`basename ${cwd}`
 294       (
 295         echo "[web]"
 296         echo "description = ${serving}"
 297         echo "allow_push = *"
 298         echo "push_ssl = False"
 299 
 300         echo "[paths]"
 301         for i in ${repos} ; do
 302           if [ "${i}" != "." ] ; then
 303             echo "/${serving}/${i} = ${i}"
 304           else
 305             echo "/${serving} = ${cwd}"
 306           fi
 307         done
 308       ) > ${tmp}/serve.web-conf
 309 
 310       echo "serving root repo ${serving}" > ${status_output}
 311 
 312       echo "hg${global_opts} serve ${@}" > ${status_output}
 313       (PYTHONUNBUFFERED=true hg${global_opts} serve -A ${status_output} -E ${status_output} --pid-file ${tmp}/serve.pid --web-conf ${tmp}/serve.web-conf "${@}"; echo "$?" > ${tmp}/serve.pid.rc ) 2>&1 &
 314     ) 2>&1 | sed -e "s@^@serve:   @" > ${status_output}
 315   ) &
 316 else
 317   # Run the supplied command on all repos in parallel.
 318 
 319   # n is the number of subprocess started or which might still be running.
 320   n=0
 321   if [ ${have_fifos} = "true" ]; then
 322     # if we have fifos use them to detect command completion.
 323     mkfifo ${tmp}/fifo
 324     exec 3<>${tmp}/fifo
 325   fi
 326 
 327   # iterate over all of the subrepos.
 328   for i in ${repos} ${repos_extra} ; do
 329     n=`expr ${n} '+' 1`
 330     repopidfile=`echo ${i} | sed -e 's@./@@' -e 's@/@_@g'`
 331     reponame=`echo ${i} | sed -e :a -e 's/^.\{1,20\}$/ &/;ta'`
 332     pull_base="${pull_default}"
 333 


< prev index next >