view doc/ja/docbook.ja.conf @ 1803:06e7447c7302

speed up hg log --patch Changing dodiff to read the manifest/changelog for node1 before calling repo.update allows us to take advantage of the revlog revision cache. Before this patch and my previous "speed up hg log --debug" patch, when using hg log -p to display three revisions (A, B and C), dodiff and repo.changes would end up reading the manifests in this order: B A B A C B C B With both patches, this order becomes: A A B B B B C C (This considers only dodiff and repo.changes. I'm not sure how other parts of hg log enter the picture.) The speed up will depend on the revisions being displayed. (All "before" times already have my previous "speed up hg log --debug" patch applied.) hg repo (tip = 414e81ae971f). hg log -p before after real 0m50.981s 0m45.279s user 0m47.930s 0m42.560s sys 0m2.526s 0m2.523s output size: 6917897 bytes kernel repo (tip = 9d4e135960ed). hg log -p -l64 before after real 2m14.995s 1m45.025s user 2m9.509s 1m33.900s sys 0m3.663s 0m2.942s output size: 31497621 bytes same kernel repo. hg log -p -l64 -r c84c2069592f:0 before after real 1m48.045s 1m0.076s user 1m44.094s 0m58.492s sys 0m2.603s 0m1.103s output size: 197983 bytes c84c2069592f was the tip of a 10 day old kernel repo that I had lying around and was where I first tested this patch. For some weird coincidence it's also a place where the patch makes a huge difference.
author Alexis S. L. Carvalho <alexis@cecm.usp.br>
date Sun, 26 Feb 2006 02:26:17 +0100
parents a64fdaf60f9d
children ea7b982b6c08
line wrap: on
line source

#
# docbook.conf
#
# Asciidoc configuration file.
# Modified docbook backend for Japanese.
#

[miscellaneous]
outfilesuffix=.xml
# Printable page width in pts.
pagewidth=380
pageunits=pt

[attributes]
basebackend=docbook
basebackend-docbook=

[replacements]
# Line break markup is dropped (there is no DocBook line break tag).
(?m)^(.*)\s\+$=\1
# Superscripts.
\^(.+?)\^=<superscript>\1</superscript>
# Subscripts.
~(.+?)~=<subscript>\1</subscript>

[ruler-blockmacro]
# Only applies to HTML so don't output anything.

[image-inlinemacro]
<inlinemediaobject>
  <imageobject>
  <imagedata fileref="{target}"{width? contentwidth="{width}pt"}{height? contentdepth="{height}pt"}/>
  </imageobject>
  <textobject><phrase>{1={target}}</phrase></textobject>
</inlinemediaobject>

[image-blockmacro]
<figure{id? id="{id}"}><title>{title}</title>
{title%}<informalfigure{id? id="{id}"}>
<mediaobject>
  <imageobject>
  <imagedata fileref="{target}"{width? contentwidth="{width}pt"}{height? contentdepth="{height}pt"}/>
  </imageobject>
  <textobject><phrase>{1={target}}</phrase></textobject>
</mediaobject>
{title#}</figure>
{title%}</informalfigure>

[indexterm-inlinemacro]
# Inline index term.
# Generate separate index entries for primary, secondary and tertiary
# descriptions.
# Primary only.
{2%}<indexterm>
{2%}  <primary>{1}</primary>
{2%}</indexterm>
# Primary and secondary.
{2#}{3%}<indexterm>
{2#}{3%}  <primary>{1}</primary><secondary>{2}</secondary>
{2#}{3%}</indexterm>
{2#}{3%}<indexterm>
{2#}{3%}  <primary>{2}</primary>
{2#}{3%}</indexterm>
# Primary, secondary and tertiary.
{3#}<indexterm>
  <primary>{1}</primary><secondary>{2}</secondary><tertiary>{3}</tertiary>
{3#}</indexterm>
{3#}<indexterm>
  <primary>{2}</primary><secondary>{3}</secondary>
{3#}</indexterm>
{3#}<indexterm>
  <primary>{3}</primary>
{3#}</indexterm>

[indexterm2-inlinemacro]
# Inline index term.
# Single entry index term that is visible in the primary text flow.
<indexterm>
  <primary>{1}</primary>
</indexterm>
{1}

[footnote-inlinemacro]
# Inline footnote.
<footnote><simpara>{0}</simpara></footnote>

[callout-inlinemacro]
# Inline callout.
<co id="{coid}"/>

[tags]
# Bulleted, numbered and labeled list tags.
ilist=<itemizedlist{id? id="{id}"}>{title?<title>{title}</title>}|</itemizedlist>
ilistitem=<listitem>|</listitem>
ilisttext=<simpara>|</simpara>
olist=<orderedlist{id? id="{id}"}>{title?<title>{title}</title>}|</orderedlist>
olist2=<orderedlist{id? id="{id}"} numeration="loweralpha">|</orderedlist>
olistitem=<listitem>|</listitem>
olisttext=<simpara>|</simpara>
vlist=<variablelist{id? id="{id}"}>{title?<title>{title}</title>}|</variablelist>
vlistentry=<varlistentry>|</varlistentry>
vlistterm=<term>|</term>
vlisttext=<simpara>|</simpara>
vlistitem=<listitem>|</listitem>
# Horizontal labeled list (implemented with two column table).
# Hardwired column widths to 30%,70% because the current crop of PDF
# generators do not auto calculate column widths.
hlist=<{title?table}{title!informaltable}{id? id="{id}"} tabstyle="{style=hlabeledlist}" pgwide="0" frame="none" colsep="0" rowsep="0">{title?<title>{title}</title>}<tgroup cols="2"><colspec colwidth="{1=3}*"/><colspec colwidth="{2=7}*"/><tbody valign="top">|</tbody></tgroup><{title?/table}{title!/informaltable}>
hlistentry=<row>|</row>
hlisttext=<simpara>|</simpara>
hlistterm=<entry><simpara>|</simpara></entry>
hlistitem=<entry>|</entry>

# Question and Answer list.
qlist=<qandaset{id? id="{id}"}>{title?<title>{title}</title>}|</qandaset>
qlistentry=<qandaentry>|</qandaentry>
qlistterm=<question><simpara>|</simpara></question>
qlistitem=<answer>|</answer>
qlisttext=<simpara>|</simpara>
# Bibliography list.
blist=|
blistitem=<bibliomixed>|</bibliomixed>
blisttext=<bibliomisc>|</bibliomisc>
# Glossary list.
glist=|
glistentry=<glossentry>|</glossentry>
glistterm=<glossterm>|</glossterm>
glistitem=<glossdef>|</glossdef>
glisttext=<simpara>|</simpara>
# Callout list.
colist=<calloutlist{id? id="{id}"}>{title?<title>{title}</title>}|</calloutlist>
colistitem=<callout arearefs="{coids}">|</callout>
colisttext=<simpara>|</simpara>

# Quoted text
emphasis=<emphasis>|</emphasis>
strong=<emphasis role="strong">|</emphasis>
monospaced=<literal>|</literal>
quoted={amp}#8220;|{amp}#8221;

# Inline macros
[http-inlinemacro]
<ulink url="{name}:{target}">{0={name}:{target}}</ulink>
[https-inlinemacro]
<ulink url="{name}:{target}">{0={name}:{target}}</ulink>
[ftp-inlinemacro]
<ulink url="{name}:{target}">{0={name}:{target}}</ulink>
[file-inlinemacro]
<ulink url="{name}:{target}">{0={name}:{target}}</ulink>
[mailto-inlinemacro]
<ulink url="{name}:{target}">{0={target}}</ulink>
#<email>{target}</email>
[link-inlinemacro]
<ulink url="{target}">{0={target}}</ulink>
# anchor:id[text]
[anchor-inlinemacro]
<anchor id="{target}" xreflabel="{0=[{target}]}"/>
# [[id,text]]
[anchor2-inlinemacro]
<anchor id="{1}" xreflabel="{2=[{1}]}"/>
# [[[id]]]
[anchor3-inlinemacro]
<anchor id="{1}" xreflabel="[{1}]"/>[{1}]
# xref:id[text]
[xref-inlinemacro]
<link linkend="{target}">{0}</link>
{2%}<xref linkend="{target}"/>
# <<id,text>>
[xref2-inlinemacro]
<link linkend="{1}">{2}</link>
{2%}<xref linkend="{1}"/>


# Special word macros
[emphasizedwords]
<emphasis>{words}</emphasis>
[monospacedwords]
<literal>{words}</literal>
[strongwords]
<emphasis role="strong">{words}</emphasis>

# Paragraph substitution.
[paragraph]
<formalpara{id? id="{id}"}><title>{title}</title><para>
{title%}<simpara{id? id="{id}"}>
|
{title%}</simpara>
{title#}</para></formalpara>
{empty}

[admonitionparagraph]
<{name}{id? id="{id}"}><simpara>|</simpara></{name}>

[literalparagraph]
# The literal block employs the same markup.
template::[literalblock]

[verseparagraph]
template::[verseblock]

# Delimited blocks.
[literalblock]
<example><title>{title}</title>
<literallayout{id? id="{id}"} class="{font=monospaced}">
|
</literallayout>
{title#}</example>

[listingblock]
<example><title>{title}</title>
<screen>
|
</screen>
{title#}</example>

[verseblock]
<formalpara{id? id="{id}"}><title>{title}</title><para>
{title%}<literallayout{id? id="{id}"}>
{title#}<literallayout>
|
</literallayout>
{title#}</para></formalpara>

[sidebarblock]
<sidebar{id? id="{id}"}>
<title>{title}</title>
|
</sidebar>

[backendblock]
|

[quoteblock]
# The epigraph element may be more appropriate than blockquote.
<blockquote{id? id="{id}"}>
<title>{title}</title>
<attribution>
{attribution}
<citetitle>{citetitle}</citetitle>
</attribution>
|
</blockquote>

[exampleblock]
<{title?example}{title!informalexample}{id? id="{id}"}>
<title>{title}</title>
|
</{title?example}{title!informalexample}>

[admonitionblock]
<{name}{id? id="{id}"}>
<title>{title}</title>
|
</{name}>

# Tables.
[tabledef-default]
template=table		
colspec=<colspec colwidth="{colwidth}{pageunits}" align="{colalign}"/>
bodyrow=<row>|</row>
bodydata=<entry>|</entry>

[table]
<{title?table}{title!informaltable}{id? id="{id}"} pgwide="0"
frame="{frame=topbot}"
{grid%rowsep="0" colsep="0"}
{eval:\{"none":"rowsep=\"0\" colsep=\"0\"", "cols":"rowsep=\"0\" colsep=\"1\"", "all":"rowsep=\"1\" colsep=\"1\"", "rows":"rowsep=\"1\" colsep=\"0\"" \}["{grid}"]}
>
<title>{title}</title>
<tgroup cols="{cols}">
{colspecs}
{headrows#}<thead>
{headrows}
{headrows#}</thead>
{footrows#}<tfoot>
{footrows}
{footrows#}</tfoot>
<tbody>
{bodyrows}
</tbody>
</tgroup>
</{title?table}{title!informaltable}>

[specialsections]
ifdef::doctype-article[]
^Abstract$=sect-abstract
endif::doctype-article[]

ifdef::doctype-book[]
^Colophon$=sect-colophon
^Dedication$=sect-dedication
^Preface$=sect-preface
endif::doctype-book[]

^Index$=sect-index
^(Bibliography|References)$=sect-bibliography
^Glossary$=sect-glossary
^Appendix [A-Z][:.](?P<title>.*)$=sect-appendix

# Special sections.
[sect-preface]
<preface{id? id="{id}"}>
<title>{title}</title>
|
</preface>

[sect-index]
<index{id? id="{id}"}>
<title>{title}</title>
|
</index>

[sect-bibliography]
<bibliography{id? id="{id}"}>
<title>{title}</title>
|
</bibliography>

[sect-glossary]
<glossary{id? id="{id}"}>
<title>{title}</title>
|
</glossary>

[sect-appendix]
<appendix{id? id="{id}"}>
<title>{title}</title>
|
</appendix>


[header-declarations]
<?xml version="1.0" encoding="{encoding}"?>
<!DOCTYPE {eval:\{"article":"article", "book":"book", "manpage":"refentry"\}["{doctype}"]} PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">

#-------------------------
# article document type
#-------------------------
ifdef::doctype-article[]

[header]
template::[header-declarations]

<article lang="ja">
{doctitle#}<articleinfo>
    <title>{doctitle}</title>
    <date>{date}</date>
    {authored#}<author>
        <firstname>{firstname}</firstname>
        <othername>{middlename}</othername>
        <surname>{lastname}</surname>
        <affiliation><address><email>{email}</email></address></affiliation>
    {authored#}</author>

# If file named like source document with -revhistory.xml suffix exists
# include it as the document history, otherwise use current revision.
{revisionhistory#}{include:{docdir}/{docname}-revhistory.xml}
{revisionhistory%}<revhistory><revision><revnumber>{revision}</revnumber><date>{date}</date>{revremark?<revremark>{revremark}</revremark>}</revision></revhistory>

    <corpname>{companyname}</corpname>
{doctitle#}</articleinfo>

[footer]
</article>

[preamble]
# Untitled elements between header and first section title.
|

[sect-abstract]
<abstract{id? id="{id}"}>
|
</abstract>

[sect1]
<section{id? id="{id}"}>
<title>{title}</title>
|
</section>

[sect2]
<section{id? id="{id}"}>
<title>{title}</title>
|
</section>

[sect3]
<section{id? id="{id}"}>
<title>{title}</title>
|
</section>

[sect4]
<section{id? id="{id}"}>
<title>{title}</title>
|
</section>

endif::doctype-article[]

#-------------------------
# manpage document type
#-------------------------
ifdef::doctype-manpage[]

[replacements]
# The roff format does not substitute special characters so just print them as
# text.
\(C\)=(C)
\(TM\)=(TM)

[header]
template::[header-declarations]
<refentry>
<refmeta>
<refentrytitle>{mantitle}</refentrytitle>
<manvolnum>{manvolnum}</manvolnum>
</refmeta>
<refnamediv>
    <refname>{manname}</refname>
    <refpurpose>{manpurpose}</refpurpose>
</refnamediv>

[footer]
</refentry>

# Section macros
[sect-synopsis]
<refsynopsisdiv{id? id="{id}"}>
|
</refsynopsisdiv>

[sect1]
<refsect1{id? id="{id}"}>
<title>{title}</title>
|
</refsect1>

[sect2]
<refsect2{id? id="{id}"}>
<title>{title}</title>
|
</refsect2>

[sect3]
<refsect3{id? id="{id}"}>
<title>{title}</title>
|
</refsect3>

endif::doctype-manpage[]

#-------------------------
# book document type
#-------------------------
ifdef::doctype-book[]

[header]
template::[header-declarations]

<book lang="ja">
{doctitle#}<bookinfo>
    <title>{doctitle}</title>
    <date>{date}</date>
    {authored#}<author>
        <firstname>{firstname}</firstname>
        <othername>{middlename}</othername>
        <surname>{lastname}</surname>
        <affiliation><address><email>{email}</email></address></affiliation>
    {authored#}</author>

# If file named like source document with -revhistory.xml suffix exists
# include it as the document history, otherwise use current revision.
{revisionhistory#}{include:{docdir}/{docname}-revhistory.xml}
{revisionhistory%}<revhistory><revision><revnumber>{revision}</revnumber><date>{date}</date>{revremark?<revremark>{revremark}</revremark>}</revision></revhistory>

    <corpname>{companyname}</corpname>
{doctitle#}</bookinfo>

[footer]
</book>

[preamble]
# Preamble is not allowed in DocBook book so wrap it in a preface. 
<preface{id? id="{id}"}>
<title>Preface</title>
|
</preface>

[sect-dedication]
<dedication{id? id="{id}"}>
|
</dedication>

[sect-colophon]
<colophon{id? id="{id}"}>
|
</colophon>

[sect0]
<part{id? id="{id}"}>
<title>{title}</title>
|
</part>

[sect1]
<chapter{id? id="{id}"}>
<title>{title}</title>
|
</chapter>

[sect2]
<section{id? id="{id}"}>
<title>{title}</title>
|
</section>

[sect3]
<section{id? id="{id}"}>
<title>{title}</title>
|
</section>

[sect4]
<section{id? id="{id}"}>
<title>{title}</title>
|
</section>

endif::doctype-book[]

ifdef::sgml[]
#
# Optional DocBook SGML.
#
# Most of the differences between DocBook XML and DocBook SGML boils
# down to the empty element syntax: SGML does not like the XML empty
# element <.../> syntax, use <...> instead.
#
[miscellaneous]
outfilesuffix=.sgml

[header-declarations]
<!DOCTYPE {eval:\{"article":"article", "book":"book", "manpage":"refentry"\}["{doctype}"]} PUBLIC "-//OASIS//DTD DocBook V4.1//EN">

[tabledef-default]
colspec=<colspec colwidth="{colwidth}{pageunits}" align="{colalign}">

[image-inlinemacro]
<inlinemediaobject>
  <imageobject>
  <imagedata fileref="{target}"{width? width="{width}pt"}{height? depth="{height}pt"}>
  </imageobject>
  <textobject><phrase>{1={target}}</phrase></textobject>
</inlinemediaobject>

[image-blockmacro]
<figure><title>{title}</title>
{title%}<informalfigure>
<mediaobject>
  <imageobject>
  <imagedata fileref="{target}"{width? width="{width}pt"}{height? depth="{height}pt"}>
  </imageobject>
  <textobject><phrase>{1={target}}</phrase></textobject>
</mediaobject>
{title#}</figure>
{title%}</informalfigure>

# Inline macros
[xref-inlinemacro]
<link linkend="{target}">{0}</link>
{2%}<xref linkend="{target}">
[xref2-inlinemacro]
# <<id,text>>
<link linkend="{1}">{2}</link>
{2%}<xref linkend="{1}">
[anchor-inlinemacro]
<anchor id="{target}" xreflabel="{0=[{target}]}">
[anchor2-inlinemacro]
# [[id,text]]
<anchor id="{1}" xreflabel="{2=[{1}]}">

endif::sgml[]