Like everyone else at Sun, we've cut over to Mercurial to manage our source code. We have our own gate and we want to be able to view the set of applied changes. hg serve will do that for you. And immediately, I asked the group if someone had a smf service for it.
The answer was no. So Robert Gordon kindly supplied one.
You place hg_serve.xml in /var/svc/manifest/network and hg-serve in /usr/local/smf_method (you can place it elsewhere, just modify the path in hg_serve.xml).
And then comes the fun part of activating the service. I had to read the man page. :)
# svccfg import hg_serve.xml # svcadm enable svc:/network/hg_serve
And now the hg serve will survive a reboot!