Differences between revisions 14 and 15
Revision 14 as of 2008-08-24 10:11:06
Size: 1701
Editor: BGeron
Comment: correct CGIinstall link
Revision 15 as of 2009-05-07 14:49:33
Size: 2210
Editor: tjyang
Comment: update the command out using hg 1.2.1
Deletions are marked like this. Additions are marked like this.
Line 16: Line 16:
$ hg help serve bash-2.05$ hg --version
Mercurial Distributed SCM (version 1.2.1)

Copyright (C) 2005-2009 Matt Mackall <mpm@selenic.com> and others
This is free software; see the source for copying conditions. There is NO
bash-2.05$ hg help serve
Line 24: Line 30:
    stderr.  Use the "-A" and "-E" options to log to files.     stderr. Use the "-A" and "-E" options to log to files.
Line 32: Line 38:
 -p --port port to use (default: 8000)
 -a --address address to use
 -p --port port to listen on (default: 8000)
 -a --address address to listen on (default: all interfaces)
    --prefix prefix path to
serve from (default: server root)
Line 41: Line 48:
}}}     --certificate SSL certificate file

use "hg -v help serve" to show global options

Mercurial has a built-in light-weight web server which can be used for browsing a repository with a web browser or for allowing remote machines to pull from you. To use it, simply run:

$ hg serve

And then point your web browser at http://localhost:8000/.

The built-in web server is missing some features found in other web servers, including access control, authentication, SSL, etc. These are especially useful if you want to be able to securely push to a web-based repository. Thus, if you want to make a more permanent server, you should probably use a [:CGIinstall:CGI-based server].

Following are detailed options for using hg's HTTP server:

hgserve (last edited 2012-10-25 19:49:02 by mpm)