invalid ip addr on hg serve

Martin Geisler mg at daimi.au.dk
Thu Mar 27 07:00:16 CDT 2008


"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.

-- 
Martin Geisler

VIFF (Virtual Ideal Functionality Framework) brings easy and efficient
SMPC (Secure Multi-Party Computation) to Python. See: http://viff.dk/.



More information about the Mercurial mailing list