= Plan 9 from Bell Labs = <> '''This platform is supported by Mercurial as of version 2.2.''' The {{{contrib/plan9}}} directory contains support for Mercurial on [[http://www.plan9.bell-labs.com/|Plan 9 from Bell Labs]] platforms. It is assumed that the version of Python running on these systems supports the ANSI/POSIX Environment (APE). At the time of this writing, the {{{bichued/python}}} port is the most commonly installed version of Python on these platforms. If a native port of Python is ever made, some minor modification will need to be made to support some of the more esoteric requirements of the platform rather than those currently made (cf. {{{posix.py}}}). == Configuration == Configuration on Plan 9 is largely the same as other platforms. This section defines platform-specific differences. === File paths === Configuration file paths have been slightly modified to fit into the Plan 9 file system hierarchy: Per-user configuration: * {{{$home/lib/hgrc}}} Per-system configuration: * {{{/lib/mercurial/hgrc}}} * {{{/lib/mercurial/hgrc.d/*.rc}}} Per-installation configuration: * {{{/lib/mercurial/hgrc}}} * {{{/lib/mercurial/hgrc.d/*.rc}}} For more detail, see [[Topic:config|hg help config]]. === Other differences === By default, installations will have the FactotumExtension enabled; this extension permits [[http://plan9.bell-labs.com/magic/man2html/4/factotum|factotum(4)]] to act as an authentication agent for HTTP repositories. Additionally, an ExtdiffExtension command named {{{9diff}}} is enabled which generates [[http://plan9.bell-labs.com/magic/man2html/1/diff|diff(1)]] compatible output suitable for use with the [[http://plan9.bell-labs.com/magic/man2html/4/plumber|plumber(4)]]. Commit messages are plumbed using {{{E}}} if no editor is defined; users must update the plumbed file to continue, otherwise the hg process must be interrupted. This change was primarily made to reduce confusion as [[http://plan9.bell-labs.com/magic/man2html/1/vi|vi(1)]] is the MIPS instruction simulator on Plan 9 platforms. == Prerequisites == The following packages should be installed from fgb's contrib via {{{contrib/install}}}: * {{{fgb/z}}} * {{{fgb/bz2}}} * {{{fgb/openssl}}} * {{{bichued/python}}} Once these packages are installed, the following directories should be (re)moved prior to either installing a binary package or building from source. This step is due to improper packaging by {{{bichued/python}}}: * {{{/sys/lib/python/hgext}}} * {{{/sys/lib/python/mercurial}}} For more detail, see [[http://plan9.bell-labs.com/magic/man2html/1/contrib|contrib(1)]]. == Installation == Building on Plan 9 can be somewhat of a challenge since it requires explict use of APE. Due to the lack of loadable extension modules on Plan 9, the distribution must be built with {{{--pure}}}. Additionally, GNU gettext is not supported, so building locales must be skipped. Scripts should also be installed to {{{/rc/bin}}} to ensure they are in the default path for users. A {{{mkfile}}} is provided in the contrib directory to ease the burden of building and installing the distribution. To build, issue: {{{ % mk build }}} To install, issue: {{{ % mk install }}} Once installed, {{{hg debuginstall}}} should be issued to identify problems: {{{ % hg debuginstall Checking encoding (UTF-8)... Checking installed modules (/sys/lib/python/lib/python2.5/site-packages/mercurial)... Checking templates (/sys/lib/python/lib/python2.5/site-packages/mercurial/templates)... Checking commit editor... Checking username... No problems detected }}} == Packaging == {i} A maintained binary package is available from fgb's contrib named {{{stallion/mercurial}}}. This package tracks official releases and should be suitable for most (if not all) Plan 9 users. A [[http://plan9.bell-labs.com/magic/man2html/2/proto|proto(2)]] file is included in the contrib directory as an example of how a binary distribution could be packaged, ostensibly with [[http://plan9.bell-labs.com/magic/man2html/1/contrib|contrib(1)]]. == TODO == Some work remains with regard to documentation. Section 5 manual page references for {{{hgignore}}} and {{{hgrc}}} need to be re-numbered to section 6 (file formats) and a new man page writer should be written to support the Plan 9 man macro set. Until these issues can be resolved, manual pages are elided from the installation. ---- CategoryDeveloper CategoryHowTo CategoryPlan9