[PATCH] test-serve: substitute `hostname` with localhost

Christian Ebert blacktrash at gmx.net
Tue Mar 18 08:17:30 CDT 2008


Hi,

While Patrick's patch makes everything a lot simpler, I still
need to do something like this here.

Also just s/$HOSTNAME/localhost does not suffice. On the other
hand I don't know about the portability of hostname.

c


# HG changeset patch
# User Christian Ebert <blacktrash at gmx.net>
# Date 1205845953 -3600
# Node ID 696670320a1b38f1e13342d55e2ff2de446a157a
# Parent  874ca958025bede085d75dca59c9fc03a50748de
test-serve: substitute `hostname` with localhost

diff --git a/tests/test-serve b/tests/test-serve
--- a/tests/test-serve
+++ b/tests/test-serve
@@ -3,7 +3,9 @@
 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/'
+        | sed -e 's/:[0-9][0-9]*//g' \
+              -e 's/localhost\.localdomain/localhost/' \
+              -e "s/`hostname`/localhost/"
     cat hg.pid >> "$DAEMON_PIDS"
     sleep 1
     kill `cat hg.pid`


More information about the Mercurial-devel mailing list