changeset 9162:2399362b3bb0

doc: link man pages to one another
author Martin Geisler <mg@lazybytes.net>
date Thu, 16 Jul 2009 23:25:26 +0200
parents e8b653a4b8da
children b67adc2daa15
files doc/Makefile doc/common.txt doc/hg.1.txt doc/hgignore.5.txt doc/hgrc.5.txt
diffstat 5 files changed, 24 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/doc/Makefile	Thu Jul 16 23:25:26 2009 +0200
+++ b/doc/Makefile	Thu Jul 16 23:25:26 2009 +0200
@@ -20,14 +20,14 @@
 hg.1.gendoc.txt: gendoc.py ../mercurial/commands.py ../mercurial/help.py
 	${PYTHON} gendoc.py > $@
 
-%: %.txt
+%: %.txt common.txt
 	# add newline after all literal blocks and fix backslash escape
 	$(RST2MAN) $*.txt \
 	  | sed -e 's/^\.fi$$/.fi\n/' \
 	  | sed -e 's/\\fB\\\\fP/\\fB\\e\\fP/' \
 	  > $*
 
-%.html: %.txt
+%.html: %.txt common.txt
 	$(RST2HTML) $*.txt > $*.html
 
 MANIFEST: man html
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/doc/common.txt	Thu Jul 16 23:25:26 2009 +0200
@@ -0,0 +1,8 @@
+.. Common link and substitution definitions.
+
+.. |hg(1)| replace:: **hg**\ (1)
+.. _hg(1): hg.1.html
+.. |hgrc(5)| replace:: **hgrc**\ (5)
+.. _hgrc(5): hgrc.5.html
+.. |hgignore(5)| replace:: **hgignore**\ (5)
+.. _hgignore(5): hgignore.5.html
--- a/doc/hg.1.txt	Thu Jul 16 23:25:26 2009 +0200
+++ b/doc/hg.1.txt	Thu Jul 16 23:25:26 2009 +0200
@@ -48,7 +48,7 @@
 ``.hgignore``
     This file contains regular expressions (one per line) that
     describe file names that should be ignored by **hg**. For details,
-    see *hgignore(5)*.
+    see |hgignore(5)|_.
 
 ``.hgtags``
     This file contains changeset hash values and text tag names (one
@@ -59,7 +59,7 @@
     This file contains defaults and configuration. Values in
     ``.hg/hgrc`` override those in ``$HOME/.hgrc``, and these override
     settings made in the global ``/etc/mercurial/hgrc`` configuration.
-    See *hgrc(5)* for details of the contents and format of these
+    See |hgrc(5)|_ for details of the contents and format of these
     files.
 
 Some commands (e.g. revert) produce backup files ending in ``.orig``,
@@ -73,7 +73,7 @@
 
 SEE ALSO
 --------
-*hgignore(5)*, *hgrc(5)*
+|hgignore(5)|_, |hgrc(5)|_
 
 AUTHOR
 ------
@@ -92,3 +92,5 @@
 Copyright \(C) 2005-2009 Matt Mackall.
 Free use of this software is granted under the terms of the GNU General
 Public License (GPL).
+
+.. include:: common.txt
--- a/doc/hgignore.5.txt	Thu Jul 16 23:25:26 2009 +0200
+++ b/doc/hgignore.5.txt	Thu Jul 16 23:25:26 2009 +0200
@@ -30,12 +30,12 @@
 if any pattern in ``.hgignore`` matches ``a/b/file.c``, ``a/b`` or ``a``.
 
 In addition, a Mercurial configuration file can reference a set of
-per-user or global ignore files. See the hgrc(5) man page for details
+per-user or global ignore files. See the |hgrc(5)|_ man page for details
 of how to configure these files. Look for the "ignore" entry in the
 "ui" section.
 
 To control Mercurial's handling of files that it manages, see the
-hg(1) man page. Look for the "-I" and "-X" options.
+|hg(1)|_ man page. Look for the "-I" and "-X" options.
 
 SYNTAX
 ------
@@ -91,7 +91,7 @@
 
 SEE ALSO
 --------
-hg(1), hgrc(5)
+|hg(1)|_, |hgrc(5)|_
 
 COPYING
 -------
@@ -99,3 +99,5 @@
 Mercurial is copyright 2005-2009 Matt Mackall.
 Free use of this software is granted under the terms of the GNU General
 Public License (GPL).
+
+.. include:: common.txt
--- a/doc/hgrc.5.txt	Thu Jul 16 23:25:26 2009 +0200
+++ b/doc/hgrc.5.txt	Thu Jul 16 23:25:26 2009 +0200
@@ -743,7 +743,7 @@
     option supports hook syntax, so if you want to specify multiple
     ignore files, you can do so by setting something like
     "``ignore.other = ~/.hgignore2``". For details of the ignore file
-    format, see the hgignore(5) man page.
+    format, see the |hgignore(5)|_ man page.
 ``interactive``
     Allow to prompt the user. True or False. Default is True.
 ``logtemplate``
@@ -922,7 +922,7 @@
 
 SEE ALSO
 --------
-hg(1), hgignore(5)
+|hg(1)|_, |hgignore(5)|_
 
 COPYING
 -------
@@ -930,3 +930,5 @@
 Mercurial is copyright 2005-2009 Matt Mackall.
 Free use of this software is granted under the terms of the GNU General
 Public License (GPL).
+
+.. include:: common.txt