invalid ip addr on hg serve

Giorgos Keramidas keramida at
Thu Mar 27 11:29:51 CDT 2008

On Thu, 27 Mar 2008 12:58:48 +0000, "TK Soh" <teekaysoh at> wrote:
> On Thu, Mar 27, 2008 at 12:00 PM, Martin Geisler <mg at> wrote:
>>>>>     % hg serve -v
>>>>>     listening at (
>>>>>  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 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 '' itself is not clear
> enough. Perhaps it can be replaced with something a little more
> descriptive?

Maybe we could add an exception to the display code, so that when Hg is
listening on all interfaces, it is displayed in a more UNIXy way?  For
example, many network reporting tools show '*' when all the interfaces
are used, i.e. here is the output of sockstat(1) on a BSD system:

keramida at kobe:/home/keramida$ sockstat -l4 | sed -n -e 1p -e /sshd/p
root     sshd       1123  3  tcp4   *:22                  *:*
keramida at kobe:/home/keramida$

the *:22 `LOCAL ADDRESS' part means `all interfaces'.  Maybe we could
tweak the display code in `hg serve', to use `*' instead of too?

More information about the Mercurial mailing list