Getting hg serve to work

Jeffrey Barish jeff_barish at earthlink.net
Wed Sep 2 20:48:38 CDT 2009


Steve Borho wrote:

> On Wed, Sep 2, 2009 at 7:30 PM, Jeffrey Barish<jeff_barish at earthlink.net>
> wrote:
>> I'm trying to get hg serve to work from a remote system.  I think that
>> I'm almost there.  I have the server running in the directory that is the
>> top of the repository (/home/user/top/of/repo).  From the remote system,
>> I do hg clone http://nn.nnn.nnn.nnn/home/user/top/of/repo.  Nothing
>> happens.  The command just hangs.  I get no response at the server.  I
>> can telnet to the server and if I type help I get a response at both
>> ends.  I suspect that I'm giving the wrong clone command on the remote
>> system, but I've run out of ideas of variants to try.
> 
> By default, hg serve listens on port 8000, and you typically need to
> provide no path if you are serving from a single repository:
> 
> hg clone http://nn.nnn.nnn.nnn:8000/

Thanks.  That command created a clone, but it was in a directory called
nn.nnn.nnn.nnn:8000.  I tried

hg clone http://nn.nnn.nnn.nnn:8000 clone-repo

That worked.  Since 8000 is the default, I don't understand why I have to 
specify it.  Moreover, the example in the O'Sullivan book doesn't have the 
port number.  I am puzzled, but satisfied to have something working.  
Thanks.
-- 
Jeffrey Barish




More information about the Mercurial mailing list