diff --git a/doc/Makefile b/doc/Makefile --- a/doc/Makefile +++ b/doc/Makefile @@ -20,14 +20,14 @@ hg.1.txt: hg.1.gendoc.txt 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 diff --git a/doc/common.txt b/doc/common.txt new file mode 100644 --- /dev/null +++ b/doc/common.txt @@ -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 diff --git a/doc/hg.1.txt b/doc/hg.1.txt --- a/doc/hg.1.txt +++ b/doc/hg.1.txt @@ -48,7 +48,7 @@ FILES ``.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 @@ FILES 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 @@ below) when you find them. SEE ALSO -------- -*hgignore(5)*, *hgrc(5)* +|hgignore(5)|_, |hgrc(5)|_ AUTHOR ------ @@ -92,3 +92,5 @@ COPYING 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 diff --git a/doc/hgignore.5.txt b/doc/hgignore.5.txt --- a/doc/hgignore.5.txt +++ b/doc/hgignore.5.txt @@ -30,12 +30,12 @@ For example, say we have an an untracked 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 @@ Mercurial was written by Matt Mackall