D3650: serve: add an option to open in the default browser

Yuya Nishihara yuya at tcha.org
Fri Jun 15 09:01:08 EDT 2018


On Fri, 15 Jun 2018 08:40:33 +0000, nspanti-logilab (Nicola Spanti) wrote:
>   For laziness,  this patch could be also useful. It is also better for text shell beginners, because they may not know that they can combine commands like that (even if it is basic). Moreover, you can still use `hg serve` in foreground or use it in background and give the result of `--print-url` to a non web browser application (but I imagine that there is a way to duplicate stdout to multiple programs). These are the advantages of this patch that I see over `--print-url` of https://phab.mercurial-scm.org/D3649. It is better for convenience and require less knowledge for the user, but it is not a need. https://phab.mercurial-scm.org/D3649 was precisely suggested to me because it can fulfill the functionality of the current patch and is more versatile.

For laziness, we can add it to `[alias]`. I'm not a fan of adding lots of
one-off options since that's the source of man page bloat.

How about document the xdg-open example in `hg help serve -v`?


More information about the Mercurial-devel mailing list