From a1e0467d1262ac793a63a650d547cded11f74fe7 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Karl=20Hasselstr=C3=B6m?= Date: Sun, 21 Sep 2008 14:17:39 +0200 Subject: [PATCH] asciidoc.conf: Steal updates from git MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Steal updates to asciidoc.conf from git. Also, make sure that we use the link:[] abd stglink:[] macros correctly everywhere. Signed-off-by: Karl Hasselström --- Documentation/asciidoc.conf | 79 ++++++++++++++++++++++++++++++++------------- Documentation/stg.txt | 2 +- stgit/argparse.py | 2 +- stgit/commands/clone.py | 4 +-- 4 files changed, 61 insertions(+), 26 deletions(-) diff --git a/Documentation/asciidoc.conf b/Documentation/asciidoc.conf index 4c83756..69447ab 100644 --- a/Documentation/asciidoc.conf +++ b/Documentation/asciidoc.conf @@ -1,51 +1,86 @@ -## gitlink: macro -# -# Usage: gitlink:command[manpage-section] -# -# Note, {0} is the manpage section, while {target} is the command. -# -# Show GIT link as: (
); if section is defined, else just show -# the command. - [attributes] -caret=^ +asterisk=* +plus=+ +caret=^ startsb=[ endsb=] tilde=~ ifdef::backend-docbook[] -[gitlink-inlinemacro] -{0%{target}} -{0#} -{0#{target}{0}} -{0#} -endif::backend-docbook[] - -ifdef::backend-docbook[] +ifndef::docbook-xsl-172[] # "unbreak" docbook-xsl v1.68 for manpages. v1.69 works with or without this. +# v1.72 breaks with this because it replaces dots not in roff requests. [listingblock] {title} +ifdef::doctype-manpage[] + .ft C +endif::doctype-manpage[] | +ifdef::doctype-manpage[] + .ft +endif::doctype-manpage[] {title#} +endif::docbook-xsl-172[] +endif::backend-docbook[] + +ifdef::doctype-manpage[] +ifdef::backend-docbook[] +[header] +template::[header-declarations] + + +{mantitle} +{manvolnum} +StGit +{stgit_version} +StGit Manual + + + {manname} + {manpurpose} + +endif::backend-docbook[] +endif::doctype-manpage[] + +## link: macro +# +# Usage: link:command[manpage-section] +# +# Note, {0} is the manpage section, while {target} is the command. +# +# Show link as: (
); if section is defined, else just +# show the command. + +ifdef::backend-docbook[] +[link-inlinemacro] +{0%{target}} +{0#} +{0#{target}{0}} +{0#} endif::backend-docbook[] ifdef::backend-xhtml11[] -[gitlink-inlinemacro] +[link-inlinemacro] {target}{0?({0})} endif::backend-xhtml11[] -# stglink +## stglink: macro +# +# Usage: stglink:command[] +# +# Show StGit link as: stg-(1) in man pages, stg in +# html. ifdef::backend-docbook[] [stglink-inlinemacro] -stg {target}1 + stg-{target}1 endif::backend-docbook[] ifdef::backend-xhtml11[] [stglink-inlinemacro] -stg {target}(1) +stg {target} endif::backend-xhtml11[] diff --git a/Documentation/stg.txt b/Documentation/stg.txt index f6cd815..a0b2176 100644 --- a/Documentation/stg.txt +++ b/Documentation/stg.txt @@ -245,7 +245,7 @@ CONFIGURATION MECHANISM ----------------------- Starting with 0.12, StGIT uses the same configuration mechanism as -GIT. See gitlink:git[7] for more details. +GIT. See link:git[7] for more details. TEMPLATES --------- diff --git a/stgit/argparse.py b/stgit/argparse.py index 4cd9527..d0134f8 100644 --- a/stgit/argparse.py +++ b/stgit/argparse.py @@ -94,7 +94,7 @@ def write_asciidoc(cmd, f): o.write_asciidoc(f) f.write('\n') _write_underlined('StGit', '-', f) - f.write('Part of the StGit suite - see stglink:stg[1]\n') + f.write('Part of the StGit suite - see link:stg[1]\n') def sign_options(): def callback(option, opt_str, value, parser, sign_str): diff --git a/stgit/commands/clone.py b/stgit/commands/clone.py index d2c68bb..b83169e 100644 --- a/stgit/commands/clone.py +++ b/stgit/commands/clone.py @@ -24,10 +24,10 @@ help = 'Make a local clone of a remote repository' usage = [' '] description = """ Clone a git repository into the local directory (using -gitlink:clone[]) and initialise the local branch "master". +stglink:clone[]) and initialise the local branch "master". This operation is for example suitable to start working using the -"tracking branch" workflow (see gitlink:stg[1]). Other means to setup +"tracking branch" workflow (see link:stg[1]). Other means to setup an StGit stack are stglink:init[] and the '--create' and '--clone' commands of stglink:branch[]. -- 2.11.0