[PATCH] doc: show .hgtags, .hgignore headers in FILES section of hg.1

Christian Ebert blacktrash at gmx.net
Wed Oct 10 11:08:40 CDT 2007


This patch is meant to trigger a more elegant solution from
someone who knows what he is doing. -- I also tried to prefix
with \0, but it didn't make any difference.

Something similar should probably be done for the japanese
version, only there asciidoc already fails (here) ...

c

# HG changeset patch
# User Christian Ebert <blacktrash at gmx.net>
# Date 1192032180 -7200
# Node ID 40358aea8e7490409696829b4ed51f7cb7821a02
# Parent  4d34f8b12a9ebfb25ba52f4c9f5202964ce09c5f
doc: show .hgtags, .hgignore headers in FILES section of hg.1

diff --git a/doc/Makefile b/doc/Makefile
--- a/doc/Makefile
+++ b/doc/Makefile
@@ -19,6 +19,10 @@ hg.1.gendoc.txt: ../mercurial/commands.p
 
 %: %.xml
 	xmlto man $*.xml
+	if grep '^\.hgtags' hg.1 > /dev/null 2>&1 ; then \
+	  sed -i~ -e 's/^\(.hgignore\)/ \1/' -e 's/^\(.hgtags\)/ \1/' hg.1 ; \
+	  $(RM) hg.1~ ; \
+	fi
 
 %.xml: %.txt
 	asciidoc -d manpage -b docbook $*.txt
@@ -41,4 +45,4 @@ install: man
 	done
 
 clean:
-	$(RM) $(MAN) $(MAN:%=%.xml) $(MAN:%=%.html) *.[0-9].gendoc.txt MANIFEST
+	$(RM) $(MAN) $(MAN:%=%.xml) $(MAN:%=%.html) *.[0-9].gendoc.txt MANIFEST hg.1~



More information about the Mercurial-devel mailing list