HG(SERVE)
π HG(SERVE) β the hg serve glow-up π
okay bestie, sit down, hydrate, and let me tell you about hg serve from the HG(SERVE) manual. this is the one where your repo gets its own lil website and everybody can come look at it. main character energy fr fr β¨
πΈ SYNOPSIS πΈ
hg serve [OPTION]...
that's it. that's the whole vibe. throw some options at it and watch it cook π₯
π¦ DESCRIPTION π¦
so basically: this starts a local HTTP repository browser and pull server. you can use it for ad-hoc sharing and browsing of repositories β like, "hey bestie look at my commits real quick" energy. it is recommended to use a real web server to serve a repository for longer periods of time, though. this is a situationship, not a marriage π
β οΈ please note that the server does not implement access control. this means that, by default, anybody can read from the server and nobody can write to it by default. if you set theweb.allow-pushoption to*, that allows everybody to push to the server. you should use a real web server if you need to authenticate users β no cap, that part is not a joke.
by default, the server logs accesses to stdout and errors to stderr. use the -A/--accesslog and -E/--errorlog options to log to files instead π
want the server to pick a free port number to listen on for you? just specify a port number of 0 β in this case, the server will print the port number it uses. iconic, honestly π
Returns 0 on success. (we love a clean exit π«Ά)
β¨ OPTIONS β¨
-A,--accesslog<FILE> β name of access log file to write to. every hit gets written down, like a group chat receipts folder π-d,--daemonβ run server in background. it's gonna go do its own thing, ghosting your terminal π--daemon-postexec<VALUE[+]> β used internally by daemon mode. don't touch, it's dev business π-E,--errorlog<FILE> β name of error log file to write to. all the messy bits go here π-p,--port<PORT> β port to listen on (default:8000) πͺ-a,--address<ADDR> β address to listen on (default: all interfaces) π--prefix<PREFIX> β prefix path to serve from (default: server root) πͺ-n,--name<NAME> β name to show in web pages (default: working directory). this is your server's display name, its little nameplate π--web-conf<FILE> β name of the hgweb config file (see'hg help hgweb') β--webdir-conf<FILE> β name of the hgweb config file (DEPRECATED) β it's giving "we don't do that anymore", use the other one bestie π«--pid-file<FILE> β name of file to write process ID to. so you can find your server later, iykyk π--stdioβ for remote clients (ADVANCED) π§--cmdserver<MODE> β for remote clients (ADVANCED) π§-t,--templates<TEMPLATE> β web templates to use π¨--style<STYLE> β template style to use π-6,--ipv6β use IPv6 instead of IPv4 π--certificate<FILE> β SSL certificate file π--print-urlβ start and print only the URL π¨οΈ-S,--subreposβ recurse into subrepositories πͺ
[+] marked option can be specified multiple times.
and that's the whole page, bestie. go start a server, share your repo, be the main character of your own localhost π
this has been the HG(SERVE) manual page, HG(SERVE) edition β that's the manual name right there in the title, and the footer signs off with HG(SERVE) too. no version number, no date, just the name, twice, like a lil echo. bye pookie π
π¦ where this page comes from
- arch rolling: mercurial 7.2.4-1 Β· GPL
- fedora 43: mercurial 7.1.1-1.fc43 Β· GPL-2.0-or-later
- fedora 43: mercurial 7.1.1-2.fc43 Β· GPL-2.0-or-later
- fedora 44: mercurial 7.2-1.fc44 Β· GPL-2.0-or-later
- fedora 44: mercurial 7.2.4-1.fc44 Β· GPL-2.0-or-later
- nixos 26.05: mercurial 7.1.2
- nixos 26.05: mercurial-full 7.1.2
- nixpkgs unstable: mercurial 7.2.2
- nixpkgs unstable: mercurial-full 7.2.2
- opensuse-leap 16.0: mercurial 7.0.1-160000.2.2 Β· GPL-2.0-or-later
- opensuse-leap 16.0: mercurial 7.0.1-160000.2.2 Β· GPL-2.0-or-later
- opensuse-leap 16.0: mercurial 7.0.1-160000.2.2 Β· GPL-2.0-or-later
- opensuse-leap 16.0: mercurial 7.0.1-160000.2.2 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms