2007-06-04 23:48:59 +04:00
|
|
|
#!/bin/sh
|
|
|
|
|
2008-03-17 18:15:43 +03:00
|
|
|
hgserve()
|
|
|
|
{
|
|
|
|
hg serve -a localhost -p $HGPORT1 -d --pid-file=hg.pid -v $@ \
|
|
|
|
| sed -e 's/:[0-9][0-9]*//g' -e 's/localhost\.localdomain/localhost/'
|
|
|
|
cat hg.pid >> "$DAEMON_PIDS"
|
|
|
|
sleep 1
|
|
|
|
kill `cat hg.pid`
|
|
|
|
sleep 1
|
|
|
|
}
|
|
|
|
|
2007-06-04 23:48:59 +04:00
|
|
|
hg init test
|
|
|
|
cd test
|
|
|
|
|
2007-07-12 02:56:16 +04:00
|
|
|
echo '[web]' > .hg/hgrc
|
|
|
|
echo 'accesslog = access.log' >> .hg/hgrc
|
|
|
|
|
2007-06-04 23:48:59 +04:00
|
|
|
echo % Without -v
|
2007-10-05 23:17:01 +04:00
|
|
|
hg serve -a localhost -p $HGPORT -d --pid-file=hg.pid
|
2007-06-06 02:26:36 +04:00
|
|
|
cat hg.pid >> "$DAEMON_PIDS"
|
2007-07-12 02:56:16 +04:00
|
|
|
if [ -f access.log ]; then
|
|
|
|
echo 'access log created - .hg/hgrc respected'
|
|
|
|
fi
|
2007-06-04 23:48:59 +04:00
|
|
|
|
|
|
|
echo % With -v
|
2008-03-17 18:15:43 +03:00
|
|
|
hgserve
|
2008-01-23 01:06:37 +03:00
|
|
|
|
|
|
|
echo % With --prefix foo
|
2008-03-17 18:15:43 +03:00
|
|
|
hgserve --prefix foo
|
2008-01-23 01:06:37 +03:00
|
|
|
|
|
|
|
echo % With --prefix /foo
|
2008-03-17 18:15:43 +03:00
|
|
|
hgserve --prefix /foo
|
2008-01-23 01:06:37 +03:00
|
|
|
|
|
|
|
echo % With --prefix foo/
|
2008-03-17 18:15:43 +03:00
|
|
|
hgserve --prefix foo/
|
2008-01-23 01:06:37 +03:00
|
|
|
|
|
|
|
echo % With --prefix /foo/
|
2008-03-17 18:15:43 +03:00
|
|
|
hgserve --prefix /foo/
|