[PATCH] adding "prefix" option to "hg serve" (command line and [web] section)

Michele Cella michele.cella at gmail.com
Sun Jan 13 17:51:22 CST 2008


Thomas Arendsen Hein wrote:
> * Michele Cella <michele.cella at gmail.com> [20080110 11:56]:
>> # HG changeset patch
>> # User Michele Cella <michele.cella at gmail.com>
>> # Date 1199873700 -3600
>> # Node ID c12ac3eae317b6f37441cdb823bc8a7a7454d8aa
>> # Parent  5379497af641f87170c1eff2d0bb2a7df2189908
>> adding "prefix" option to "hg serve" (command line and [web] section)
>> allows "hg serve" to serve from a different path than '/' (server root)
> 
> mpm pushed this to the main repo.
> 
> When trying to use this, I encountered the following small problems:
> 
> First I used "hg serve --prefix foo" (with and without
> --webdir-conf), which looked ok on the first page, but all links
> pointed to pages that give errors.
> Using "--prefix /foo" helped, but this needs to be more robust.
> 

Yep, indeed.  I've fixed this issue with an additional path I've just 
prepared.

> Then I used "hg serve --prefix /foo -v", which printed
> "listening at http://thehostname:8000/" ... maybe it should append
> the prefix here?
> 

Agree, I've done that also.

> Finally it would be nice to have an automatic test for this.
> 

Thanks, for pointing this out, I've added some tests to test-serve, they 
are running fine here, let me know if I'm missing something.

Thanks for reporting and sorry for overlooking this issue.

> Thomas
> 

Michele


More information about the Mercurial-devel mailing list