##// END OF EJS Templates
Mention 'hg update' to switch branches in help for branch and branches.
Mention 'hg update' to switch branches in help for branch and branches.

File last commit:

r5971:6d5ecf82 default
r5999:d1fe1a4e default
Show More
test-serve
42 lines | 1.1 KiB | text/plain | TextLexer
#!/bin/sh
hg init test
cd test
echo '[web]' > .hg/hgrc
echo 'accesslog = access.log' >> .hg/hgrc
echo % Without -v
hg serve -a localhost -p $HGPORT -d --pid-file=hg.pid
cat hg.pid >> "$DAEMON_PIDS"
if [ -f access.log ]; then
echo 'access log created - .hg/hgrc respected'
fi
echo % With -v
hg serve -a localhost -p $HGPORT1 -d --pid-file=hg.pid -v | sed -e 's,:[0-9][0-9]*/,/,'
cat hg.pid >> "$DAEMON_PIDS"
kill `cat hg.pid`
sleep 1
echo % With --prefix foo
hg serve -a localhost -p $HGPORT1 -d --pid-file=hg.pid -v --prefix foo | sed -e 's,:[0-9][0-9]*/,/,'
cat hg.pid >> "$DAEMON_PIDS"
kill `cat hg.pid`
sleep 1
echo % With --prefix /foo
hg serve -a localhost -p $HGPORT1 -d --pid-file=hg.pid -v --prefix /foo | sed -e 's,:[0-9][0-9]*/,/,'
cat hg.pid >> "$DAEMON_PIDS"
kill `cat hg.pid`
sleep 1
echo % With --prefix foo/
hg serve -a localhost -p $HGPORT1 -d --pid-file=hg.pid -v --prefix foo/ | sed -e 's,:[0-9][0-9]*/,/,'
cat hg.pid >> "$DAEMON_PIDS"
kill `cat hg.pid`
sleep 1
echo % With --prefix /foo/
hg serve -a localhost -p $HGPORT1 -d --pid-file=hg.pid -v --prefix /foo/ | sed -e 's,:[0-9][0-9]*/,/,'
cat hg.pid >> "$DAEMON_PIDS"