cat >> $HGRCPATH<$P4ROOT/stdout 2>$P4ROOT/stderr & echo $! >> $DAEMON_PIDS trap "echo stopping the p4 server ; p4 admin stop" EXIT # wait for the server to initialize while ! p4 ; do sleep 1 done >/dev/null 2>/dev/null # create a client spec cd $p4wd P4CLIENT=hg-p4-import; export P4CLIENT DEPOTPATH=${DEPOTPATH:-//depot/...} p4 client -o | sed '/^View:/,$ d' >p4client echo View: >>p4client echo " $DEPOTPATH //$P4CLIENT/..." >>p4client p4 client -i /dev/null