invalid ip addr on hg serve

TK Soh teekaysoh at gmail.com
Thu Mar 27 07:58:48 CDT 2008


On Thu, Mar 27, 2008 at 12:00 PM, Martin Geisler <mg at daimi.au.dk> wrote:
>
> "TK Soh" <teekaysoh at gmail.com> writes:
>
>  > On Thu, Mar 27, 2008 at 1:04 AM, Benoit Boissinot
>  > <bboissin at gmail.com> wrote:
>  >>
>  >> On Thu, Mar 27, 2008 at 1:44 AM, TK Soh <teekaysoh at gmail.com>
>  >> wrote:
>  >>  > I noticed hg serve in Mercurial 1.0 always shows the IP address
>  >>  > as 0.0.0.0:
>  >>  >
>  >>  >     % hg version
>  >>  >     Mercurial Distributed SCM (version 1.0)
>  >>  >
>  >>  >     Copyright (C) 2005-2008 Matt Mackall <mpm at selenic.com> and
>  >>  >     others This is free software; see the source for copying
>  >>  >     conditions. There is NO warranty; not even for
>  >>  >     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
>  >>  >
>  >>  >     % hg serve -v
>  >>  >     listening at http://XXX.YYYY.net:8000/ (0.0.0.0:8000)
>  >>  >
>  >>  >
>  >>  >  What am I missing?
>  >>
>  >>  It means hg is listening on all interfaces, you can use -a to only
>  >>  listen on localhost for example.
>  >
>  > What does 'all interfaces' refer to? Sorry I am not familiar with
>  > the concept.
>
>  Your computer can have several "network interfaces". If you have two
>  network cards in the machine, then there will be a network interface
>  for each.
>
>  But your computer also has a "virtual" network card which listens to
>  the address 127.0.0.1 also known as localhost. This interface is
>  always present and is often used for TCP communication between
>  processes that live on the same machine.

Thanks to everyone on helping to clarify this. I'd suppose relatively
few users have more than one network card? ;-)

As an 'ordinary' user, I have to say the '0.0.0.0' itself is not clear
enough. Perhaps it can be replaced with something a little more
descriptive?


More information about the Mercurial mailing list