hgbook

changeset 566:27043f385f3f

Get autogeneration of examples more or less working.
author Bryan O'Sullivan <bos@serpentine.com>
date Mon Mar 09 22:55:38 2009 -0700 (2009-03-09)
parents 8a9c66da6fcb
children 8fcd44708f41
files en/00book.xml en/Makefile en/ch02-tour-basic.xml en/examples/auto-snippets.xml en/examples/run-example
line diff
     1.1 --- a/en/00book.xml	Mon Mar 09 21:40:12 2009 -0700
     1.2 +++ b/en/00book.xml	Mon Mar 09 22:55:38 2009 -0700
     1.3 @@ -30,6 +30,11 @@
     1.4  
     1.5  <!ENTITY % SHORTCUTS SYSTEM "book-shortcuts.xml">
     1.6  %SHORTCUTS;
     1.7 +
     1.8 +<!-- Include automatically and manually generated code snippets. -->
     1.9 +
    1.10 +<!ENTITY % AUTOSNIPPETS SYSTEM "examples/auto-snippets.xml">
    1.11 +%AUTOSNIPPETS;
    1.12  ]>
    1.13  
    1.14  <book id="hg">
     2.1 --- a/en/Makefile	Mon Mar 09 21:40:12 2009 -0700
     2.2 +++ b/en/Makefile	Mon Mar 09 22:55:38 2009 -0700
     2.3 @@ -1,12 +1,5 @@
     2.4  # This makefile requires GNU make.
     2.5  
     2.6 -sources := \
     2.7 -	00book.tex \
     2.8 -	99book.bib \
     2.9 -	99defs.tex \
    2.10 -	app*.tex \
    2.11 -	ch*.tex
    2.12 -
    2.13  image-sources := \
    2.14  	feature-branches.dot \
    2.15  	filelog.svg \
     3.1 --- a/en/ch02-tour-basic.xml	Mon Mar 09 21:40:12 2009 -0700
     3.2 +++ b/en/ch02-tour-basic.xml	Mon Mar 09 22:55:38 2009 -0700
     3.3 @@ -104,7 +104,7 @@
     3.4        that it prints isn't so important; it's whether it prints
     3.5        anything at all that we care about.</para>
     3.6  
     3.7 -      <!-- &interaction.tour.version; -->
     3.8 +    &interaction.tour.version;
     3.9  
    3.10      <sect2>
    3.11        <title>Built-in help</title>
    3.12 @@ -118,7 +118,7 @@
    3.13  	  help on a specific command (as below), it prints more
    3.14  	  detailed information.</para>
    3.15  
    3.16 -	<!-- &interaction.tour.help; -->
    3.17 +	&interaction.tour.help;
    3.18  
    3.19  	<para>For a more impressive level of detail (which you won't
    3.20  	  usually need) run <command role="hg-cmd">hg help <option
    3.21 @@ -155,13 +155,13 @@
    3.22  	called <command role="hg-cmd">hg clone</command>, because it
    3.23  	creates an identical copy of an existing repository.</para>
    3.24  
    3.25 -      <!-- &interaction.tour.clone; -->
    3.26 +      &interaction.tour.clone;
    3.27  
    3.28        <para>If our clone succeeded, we should now have a local
    3.29  	directory called <filename class="directory">hello</filename>.
    3.30  	This directory will contain some files.</para>
    3.31  
    3.32 -      <!-- &interaction.tour.ls; -->
    3.33 +      &interaction.tour.ls;
    3.34  
    3.35        <para>These files have the same contents and history in our
    3.36  	repository as they do in the repository we cloned.</para>
    3.37 @@ -186,7 +186,7 @@
    3.38  	  class="directory">.hg</filename>.  This is where Mercurial
    3.39  	keeps all of its metadata for the repository.</para>
    3.40  
    3.41 -      <!-- &interaction.tour.ls-a; -->
    3.42 +      &interaction.tour.ls-a;
    3.43  
    3.44        <para>The contents of the <filename
    3.45  	  class="directory">.hg</filename> directory and its
    3.46 @@ -216,7 +216,7 @@
    3.47  	role="hg-cmd">hg log</command> command gives us a view of
    3.48        history.</para>
    3.49  
    3.50 -    <!-- &interaction.tour.log; -->
    3.51 +    &interaction.tour.log;
    3.52  
    3.53      <para>By default, this command prints a brief paragraph of output
    3.54        for each change to the project that was recorded.  In Mercurial
    3.55 @@ -324,7 +324,7 @@
    3.56  	either a revision number or a long-form changeset identifier,
    3.57  	and you can provide as many revisions as you want.</para>
    3.58  
    3.59 -      <!-- &interaction.tour.log-r; -->
    3.60 +      &interaction.tour.log-r;
    3.61  
    3.62        <para>If you want to see the history of several revisions
    3.63  	without having to list each one, you can use <emphasis>range
    3.64 @@ -332,7 +332,7 @@
    3.65  	  want all revisions between <literal>abc</literal> and
    3.66  	  <literal>def</literal>, inclusive</quote>.</para>
    3.67        
    3.68 -	<!-- &interaction.tour.log.range; -->
    3.69 +	&interaction.tour.log.range;
    3.70  
    3.71        <para>Mercurial also honours the order in which you specify
    3.72  	revisions, so <command role="hg-cmd">hg log -r 2:4</command>
    3.73 @@ -353,7 +353,7 @@
    3.74  	  role="hg-opt-global">--verbose</option>) option gives you
    3.75  	this extra detail.</para>
    3.76  
    3.77 -      <!-- &interaction.tour.log-v; -->
    3.78 +      &interaction.tour.log-v;
    3.79  
    3.80        <para>If you want to see both the description and content of a
    3.81  	change, add the <option role="hg-opt-log">-p</option> (or
    3.82 @@ -363,7 +363,7 @@
    3.83  	see section <xref linkend="sec:mq:patch"/> for an
    3.84  	overview).</para>
    3.85  
    3.86 -      <!-- &interaction.tour.log-vp; -->
    3.87 +      &interaction.tour.log-vp;
    3.88  
    3.89      </sect2>
    3.90    </sect1>
    3.91 @@ -424,7 +424,7 @@
    3.92        than cloning over the network, and cloning a local repository
    3.93        uses less disk space in most cases, too.</para>
    3.94  
    3.95 -    <!-- &interaction.tour.reclone; -->
    3.96 +    &interaction.tour.reclone;
    3.97  
    3.98      <para>As an aside, it's often good practice to keep a
    3.99        <quote>pristine</quote> copy of a remote repository around,
   3.100 @@ -446,13 +446,13 @@
   3.101        <command>sed</command>; simply use your preferred text editor to
   3.102        do the same thing.)</para>
   3.103  
   3.104 -    <!-- &interaction.tour.sed; -->
   3.105 +    &interaction.tour.sed;
   3.106  
   3.107      <para>Mercurial's <command role="hg-cmd">hg status</command>
   3.108        command will tell us what Mercurial knows about the files in the
   3.109        repository.</para>
   3.110  
   3.111 -    <!-- &interaction.tour.status; -->
   3.112 +    &interaction.tour.status;
   3.113  
   3.114      <para>The <command role="hg-cmd">hg status</command> command
   3.115        prints no output for some files, but a line starting with
   3.116 @@ -475,7 +475,7 @@
   3.117        do this, we use the <command role="hg-cmd">hg diff</command>
   3.118        command.</para>
   3.119  
   3.120 -    <!-- &interaction.tour.diff; -->
   3.121 +    &interaction.tour.diff;
   3.122  
   3.123    </sect1>
   3.124    <sect1>
   3.125 @@ -598,7 +598,7 @@
   3.126  	  printed by <command role="hg-cmd">hg log</command> after
   3.127  	  we've finished committing.</para>
   3.128  
   3.129 -       <!-- &interaction.tour.commit; -->
   3.130 +       &interaction.tour.commit;
   3.131  
   3.132        <para>The editor that the <command role="hg-cmd">hg
   3.133  	    commit</command> command drops us into will contain an
   3.134 @@ -665,7 +665,7 @@
   3.135  	    log</command>, but it only displays the newest revision in
   3.136  	  the repository.</para>
   3.137  
   3.138 -      <!-- &interaction.tour.tip; -->
   3.139 +      &interaction.tour.tip;
   3.140  
   3.141        <para>We refer to
   3.142  	  the newest revision in the repository as the tip revision,
   3.143 @@ -691,7 +691,7 @@
   3.144  	  call our temporary repository <filename
   3.145  	    class="directory">hello-pull</filename>.</para>
   3.146  
   3.147 -      <!-- &interaction.tour.clone-pull; -->
   3.148 +      &interaction.tour.clone-pull;
   3.149  
   3.150        <para>We'll use the <command role="hg-cmd">hg
   3.151  	    pull</command> command to bring changes from <filename
   3.152 @@ -704,7 +704,7 @@
   3.153  	  command <emphasis>would</emphasis> pull into the repository,
   3.154  	  without actually pulling the changes in.</para>
   3.155  
   3.156 -      <!-- &interaction.tour.incoming; -->
   3.157 +      &interaction.tour.incoming;
   3.158  
   3.159        <para>(Of course, someone could
   3.160  	  cause more changesets to appear in the repository that we
   3.161 @@ -718,7 +718,7 @@
   3.162  	    pull</command> command, and telling it which repository to
   3.163  	  pull from.</para>
   3.164  
   3.165 -      <!-- &interaction.tour.pull; -->
   3.166 +      &interaction.tour.pull;
   3.167  
   3.168        <para>As you can see
   3.169  	  from the before-and-after output of <command
   3.170 @@ -740,7 +740,7 @@
   3.171  	the working directory.  Instead, we use the <command
   3.172  	  role="hg-cmd">hg update</command> command to do this.</para>
   3.173  
   3.174 -      <!-- &interaction.tour.update; -->
   3.175 +      &interaction.tour.update;
   3.176  
   3.177        <para>It might seem a bit strange that <command role="hg-cmd">hg
   3.178  	  pull</command> doesn't update the working directory
   3.179 @@ -771,7 +771,7 @@
   3.180  	the <command role="hg-cmd">hg parents</command>
   3.181  	command.</para>
   3.182  
   3.183 -      <!-- &interaction.tour.parents; -->
   3.184 +      &interaction.tour.parents;
   3.185  
   3.186        <para>If you look back at figure <xref
   3.187  	  linkend="fig:tour-basic:history"/>,
   3.188 @@ -787,7 +787,7 @@
   3.189  	give a revision number or changeset ID to the <command
   3.190  	  role="hg-cmd">hg update</command> command.</para>
   3.191  
   3.192 -      <!-- &interaction.tour.older; -->
   3.193 +      &interaction.tour.older;
   3.194  
   3.195        <para>If you omit an explicit revision, <command
   3.196  	  role="hg-cmd">hg update</command> will update to the tip
   3.197 @@ -805,19 +805,19 @@
   3.198  	    pull</command> above, we'll create a temporary repository
   3.199  	  to push our changes into.</para>
   3.200  
   3.201 -      <!-- &interaction.tour.clone-push; -->
   3.202 +      &interaction.tour.clone-push;
   3.203  
   3.204        <para>The <command role="hg-cmd">hg outgoing</command> command
   3.205  	  tells us what changes would be pushed into another
   3.206  	  repository.</para>
   3.207  
   3.208 -      <!-- &interaction.tour.outgoing; -->
   3.209 +      &interaction.tour.outgoing;
   3.210  
   3.211        <para>And the
   3.212  	  <command role="hg-cmd">hg push</command> command does the
   3.213  	  actual push.</para>
   3.214  
   3.215 -      <!-- &interaction.tour.push; -->
   3.216 +      &interaction.tour.push;
   3.217  
   3.218        <para>As with
   3.219  	  <command role="hg-cmd">hg pull</command>, the <command
   3.220 @@ -832,7 +832,7 @@
   3.221  	  and the receiving repository already has those changes?
   3.222  	  Nothing too exciting.</para>
   3.223  
   3.224 -      <!-- &interaction.tour.push.nothing; -->
   3.225 +      &interaction.tour.push.nothing;
   3.226      </sect2>
   3.227      <sect2>
   3.228        <title>Sharing changes over a network</title>
   3.229 @@ -843,14 +843,14 @@
   3.230  	  connection; simply pass in a URL instead of a local
   3.231  	  path.</para>
   3.232  	
   3.233 -      <!-- &interaction.tour.outgoing.net; -->
   3.234 +      &interaction.tour.outgoing.net;
   3.235  
   3.236        <para>In this example, we
   3.237  	  can see what changes we could push to the remote repository,
   3.238  	  but the repository is understandably not set up to let
   3.239  	  anonymous users push to it.</para>
   3.240  
   3.241 -      <!-- &interaction.tour.push.net; -->
   3.242 +      &interaction.tour.push.net;
   3.243      </sect2>
   3.244    </sect1>
   3.245  </chapter>
     4.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.2 +++ b/en/examples/auto-snippets.xml	Mon Mar 09 22:55:38 2009 -0700
     4.3 @@ -0,0 +1,218 @@
     4.4 +<!ENTITY interaction.backout.init SYSTEM "results/backout.init.out">
     4.5 +<!ENTITY interaction.backout.manual.backout SYSTEM "results/backout.manual.backout.out">
     4.6 +<!ENTITY interaction.backout.manual.cat SYSTEM "results/backout.manual.cat.out">
     4.7 +<!ENTITY interaction.backout.manual.clone SYSTEM "results/backout.manual.clone.out">
     4.8 +<!ENTITY interaction.backout.manual.heads SYSTEM "results/backout.manual.heads.out">
     4.9 +<!ENTITY interaction.backout.manual.log SYSTEM "results/backout.manual.log.out">
    4.10 +<!ENTITY interaction.backout.manual.merge SYSTEM "results/backout.manual.merge.out">
    4.11 +<!ENTITY interaction.backout.manual.parents SYSTEM "results/backout.manual.parents.out">
    4.12 +<!ENTITY interaction.backout.non-tip.backout SYSTEM "results/backout.non-tip.backout.out">
    4.13 +<!ENTITY interaction.backout.non-tip.cat SYSTEM "results/backout.non-tip.cat.out">
    4.14 +<!ENTITY interaction.backout.non-tip.clone SYSTEM "results/backout.non-tip.clone.out">
    4.15 +<!ENTITY interaction.backout.simple SYSTEM "results/backout.simple.out">
    4.16 +<!ENTITY interaction.backout.simple.log SYSTEM "results/backout.simple.log.out">
    4.17 +<!ENTITY interaction.bisect.commits SYSTEM "results/bisect.commits.out">
    4.18 +<!ENTITY interaction.bisect.help SYSTEM "results/bisect.help.out">
    4.19 +<!ENTITY interaction.bisect.init SYSTEM "results/bisect.init.out">
    4.20 +<!ENTITY interaction.bisect.search.bad-init SYSTEM "results/bisect.search.bad-init.out">
    4.21 +<!ENTITY interaction.bisect.search.good-init SYSTEM "results/bisect.search.good-init.out">
    4.22 +<!ENTITY interaction.bisect.search.init SYSTEM "results/bisect.search.init.out">
    4.23 +<!ENTITY interaction.bisect.search.mytest SYSTEM "results/bisect.search.mytest.out">
    4.24 +<!ENTITY interaction.bisect.search.reset SYSTEM "results/bisect.search.reset.out">
    4.25 +<!ENTITY interaction.bisect.search.rest SYSTEM "results/bisect.search.rest.out">
    4.26 +<!ENTITY interaction.bisect.search.step1 SYSTEM "results/bisect.search.step1.out">
    4.27 +<!ENTITY interaction.bisect.search.step2 SYSTEM "results/bisect.search.step2.out">
    4.28 +<!ENTITY interaction.branch-named.branch SYSTEM "results/branch-named.branch.out">
    4.29 +<!ENTITY interaction.branch-named.branches SYSTEM "results/branch-named.branches.out">
    4.30 +<!ENTITY interaction.branch-named.commit SYSTEM "results/branch-named.commit.out">
    4.31 +<!ENTITY interaction.branch-named.create SYSTEM "results/branch-named.create.out">
    4.32 +<!ENTITY interaction.branch-named.foo-commit SYSTEM "results/branch-named.foo-commit.out">
    4.33 +<!ENTITY interaction.branch-named.merge SYSTEM "results/branch-named.merge.out">
    4.34 +<!ENTITY interaction.branch-named.parents SYSTEM "results/branch-named.parents.out">
    4.35 +<!ENTITY interaction.branch-named.rebranch SYSTEM "results/branch-named.rebranch.out">
    4.36 +<!ENTITY interaction.branch-named.status SYSTEM "results/branch-named.status.out">
    4.37 +<!ENTITY interaction.branch-named.update-bar SYSTEM "results/branch-named.update-bar.out">
    4.38 +<!ENTITY interaction.branch-named.update-nothing SYSTEM "results/branch-named.update-nothing.out">
    4.39 +<!ENTITY interaction.branch-named.update-switchy SYSTEM "results/branch-named.update-switchy.out">
    4.40 +<!ENTITY interaction.branch-repo.bugfix SYSTEM "results/branch-repo.bugfix.out">
    4.41 +<!ENTITY interaction.branch-repo.clone SYSTEM "results/branch-repo.clone.out">
    4.42 +<!ENTITY interaction.branch-repo.merge SYSTEM "results/branch-repo.merge.out">
    4.43 +<!ENTITY interaction.branch-repo.new SYSTEM "results/branch-repo.new.out">
    4.44 +<!ENTITY interaction.branch-repo.pull SYSTEM "results/branch-repo.pull.out">
    4.45 +<!ENTITY interaction.branch-repo.tag SYSTEM "results/branch-repo.tag.out">
    4.46 +<!ENTITY interaction.branching.clone SYSTEM "results/branching.clone.out">
    4.47 +<!ENTITY interaction.branching.init SYSTEM "results/branching.init.out">
    4.48 +<!ENTITY interaction.branching.main SYSTEM "results/branching.main.out">
    4.49 +<!ENTITY interaction.branching.merge SYSTEM "results/branching.merge.out">
    4.50 +<!ENTITY interaction.branching.stable SYSTEM "results/branching.stable.out">
    4.51 +<!ENTITY interaction.branching.tag SYSTEM "results/branching.tag.out">
    4.52 +<!ENTITY interaction.branching.update SYSTEM "results/branching.update.out">
    4.53 +<!ENTITY interaction.cmdref.diff-p SYSTEM "results/cmdref.diff-p.out">
    4.54 +<!ENTITY interaction.daily.copy.after SYSTEM "results/daily.copy.after.out">
    4.55 +<!ENTITY interaction.daily.copy.cat SYSTEM "results/daily.copy.cat.out">
    4.56 +<!ENTITY interaction.daily.copy.clone SYSTEM "results/daily.copy.clone.out">
    4.57 +<!ENTITY interaction.daily.copy.copy SYSTEM "results/daily.copy.copy.out">
    4.58 +<!ENTITY interaction.daily.copy.dir-dest SYSTEM "results/daily.copy.dir-dest.out">
    4.59 +<!ENTITY interaction.daily.copy.dir-src SYSTEM "results/daily.copy.dir-src.out">
    4.60 +<!ENTITY interaction.daily.copy.dir-src-dest SYSTEM "results/daily.copy.dir-src-dest.out">
    4.61 +<!ENTITY interaction.daily.copy.init SYSTEM "results/daily.copy.init.out">
    4.62 +<!ENTITY interaction.daily.copy.merge SYSTEM "results/daily.copy.merge.out">
    4.63 +<!ENTITY interaction.daily.copy.other SYSTEM "results/daily.copy.other.out">
    4.64 +<!ENTITY interaction.daily.copy.simple SYSTEM "results/daily.copy.simple.out">
    4.65 +<!ENTITY interaction.daily.copy.status SYSTEM "results/daily.copy.status.out">
    4.66 +<!ENTITY interaction.daily.copy.status-copy SYSTEM "results/daily.copy.status-copy.out">
    4.67 +<!ENTITY interaction.daily.files.add SYSTEM "results/daily.files.add.out">
    4.68 +<!ENTITY interaction.daily.files.add-dir SYSTEM "results/daily.files.add-dir.out">
    4.69 +<!ENTITY interaction.daily.files.addremove SYSTEM "results/daily.files.addremove.out">
    4.70 +<!ENTITY interaction.daily.files.commit-addremove SYSTEM "results/daily.files.commit-addremove.out">
    4.71 +<!ENTITY interaction.daily.files.hidden SYSTEM "results/daily.files.hidden.out">
    4.72 +<!ENTITY interaction.daily.files.missing SYSTEM "results/daily.files.missing.out">
    4.73 +<!ENTITY interaction.daily.files.recover-missing SYSTEM "results/daily.files.recover-missing.out">
    4.74 +<!ENTITY interaction.daily.files.remove SYSTEM "results/daily.files.remove.out">
    4.75 +<!ENTITY interaction.daily.files.remove-after SYSTEM "results/daily.files.remove-after.out">
    4.76 +<!ENTITY interaction.daily.rename.rename SYSTEM "results/daily.rename.rename.out">
    4.77 +<!ENTITY interaction.daily.rename.status SYSTEM "results/daily.rename.status.out">
    4.78 +<!ENTITY interaction.daily.rename.status-copy SYSTEM "results/daily.rename.status-copy.out">
    4.79 +<!ENTITY interaction.daily.revert.add SYSTEM "results/daily.revert.add.out">
    4.80 +<!ENTITY interaction.daily.revert.copy SYSTEM "results/daily.revert.copy.out">
    4.81 +<!ENTITY interaction.daily.revert.missing SYSTEM "results/daily.revert.missing.out">
    4.82 +<!ENTITY interaction.daily.revert.modify SYSTEM "results/daily.revert.modify.out">
    4.83 +<!ENTITY interaction.daily.revert.remove SYSTEM "results/daily.revert.remove.out">
    4.84 +<!ENTITY interaction.daily.revert.rename SYSTEM "results/daily.revert.rename.out">
    4.85 +<!ENTITY interaction.daily.revert.rename-orig SYSTEM "results/daily.revert.rename-orig.out">
    4.86 +<!ENTITY interaction.daily.revert.status SYSTEM "results/daily.revert.status.out">
    4.87 +<!ENTITY interaction.daily.revert.unmodify SYSTEM "results/daily.revert.unmodify.out">
    4.88 +<!ENTITY interaction.extdiff.diff SYSTEM "results/extdiff.diff.out">
    4.89 +<!ENTITY interaction.extdiff.extdiff SYSTEM "results/extdiff.extdiff.out">
    4.90 +<!ENTITY interaction.extdiff.extdiff-ctx SYSTEM "results/extdiff.extdiff-ctx.out">
    4.91 +<!ENTITY interaction.filenames.dirs SYSTEM "results/filenames.dirs.out">
    4.92 +<!ENTITY interaction.filenames.files SYSTEM "results/filenames.files.out">
    4.93 +<!ENTITY interaction.filenames.filter.exclude SYSTEM "results/filenames.filter.exclude.out">
    4.94 +<!ENTITY interaction.filenames.filter.include SYSTEM "results/filenames.filter.include.out">
    4.95 +<!ENTITY interaction.filenames.glob.group SYSTEM "results/filenames.glob.group.out">
    4.96 +<!ENTITY interaction.filenames.glob.question SYSTEM "results/filenames.glob.question.out">
    4.97 +<!ENTITY interaction.filenames.glob.range SYSTEM "results/filenames.glob.range.out">
    4.98 +<!ENTITY interaction.filenames.glob.star SYSTEM "results/filenames.glob.star.out">
    4.99 +<!ENTITY interaction.filenames.glob.star-starstar SYSTEM "results/filenames.glob.star-starstar.out">
   4.100 +<!ENTITY interaction.filenames.glob.starstar SYSTEM "results/filenames.glob.starstar.out">
   4.101 +<!ENTITY interaction.filenames.wdir-relname SYSTEM "results/filenames.wdir-relname.out">
   4.102 +<!ENTITY interaction.filenames.wdir-subdir SYSTEM "results/filenames.wdir-subdir.out">
   4.103 +<!ENTITY interaction.hook.msglen.go SYSTEM "results/hook.msglen.go.out">
   4.104 +<!ENTITY interaction.hook.simple.ext SYSTEM "results/hook.simple.ext.out">
   4.105 +<!ENTITY interaction.hook.simple.init SYSTEM "results/hook.simple.init.out">
   4.106 +<!ENTITY interaction.hook.simple.pretxncommit SYSTEM "results/hook.simple.pretxncommit.out">
   4.107 +<!ENTITY interaction.hook.ws.better SYSTEM "results/hook.ws.better.out">
   4.108 +<!ENTITY interaction.hook.ws.simple SYSTEM "results/hook.ws.simple.out">
   4.109 +<!ENTITY interaction.issue29.go SYSTEM "results/issue29.go.out">
   4.110 +<!ENTITY interaction.mq.dodiff.diff SYSTEM "results/mq.dodiff.diff.out">
   4.111 +<!ENTITY interaction.mq.guards.init SYSTEM "results/mq.guards.init.out">
   4.112 +<!ENTITY interaction.mq.guards.qguard SYSTEM "results/mq.guards.qguard.out">
   4.113 +<!ENTITY interaction.mq.guards.qguard.neg SYSTEM "results/mq.guards.qguard.neg.out">
   4.114 +<!ENTITY interaction.mq.guards.qguard.pos SYSTEM "results/mq.guards.qguard.pos.out">
   4.115 +<!ENTITY interaction.mq.guards.qselect.cat SYSTEM "results/mq.guards.qselect.cat.out">
   4.116 +<!ENTITY interaction.mq.guards.qselect.error SYSTEM "results/mq.guards.qselect.error.out">
   4.117 +<!ENTITY interaction.mq.guards.qselect.foo SYSTEM "results/mq.guards.qselect.foo.out">
   4.118 +<!ENTITY interaction.mq.guards.qselect.foobar SYSTEM "results/mq.guards.qselect.foobar.out">
   4.119 +<!ENTITY interaction.mq.guards.qselect.qpush SYSTEM "results/mq.guards.qselect.qpush.out">
   4.120 +<!ENTITY interaction.mq.guards.qselect.quux SYSTEM "results/mq.guards.qselect.quux.out">
   4.121 +<!ENTITY interaction.mq.guards.series SYSTEM "results/mq.guards.series.out">
   4.122 +<!ENTITY interaction.mq.id.output SYSTEM "results/mq.id.output.out">
   4.123 +<!ENTITY interaction.mq.qinit-help.help SYSTEM "results/mq.qinit-help.help.out">
   4.124 +<!ENTITY interaction.mq.tarball.download SYSTEM "results/mq.tarball.download.out">
   4.125 +<!ENTITY interaction.mq.tarball.newsource SYSTEM "results/mq.tarball.newsource.out">
   4.126 +<!ENTITY interaction.mq.tarball.qinit SYSTEM "results/mq.tarball.qinit.out">
   4.127 +<!ENTITY interaction.mq.tarball.repush SYSTEM "results/mq.tarball.repush.out">
   4.128 +<!ENTITY interaction.mq.tools.lsdiff SYSTEM "results/mq.tools.lsdiff.out">
   4.129 +<!ENTITY interaction.mq.tools.tools SYSTEM "results/mq.tools.tools.out">
   4.130 +<!ENTITY interaction.mq.tutorial.add SYSTEM "results/mq.tutorial.add.out">
   4.131 +<!ENTITY interaction.mq.tutorial.qinit SYSTEM "results/mq.tutorial.qinit.out">
   4.132 +<!ENTITY interaction.mq.tutorial.qnew SYSTEM "results/mq.tutorial.qnew.out">
   4.133 +<!ENTITY interaction.mq.tutorial.qnew2 SYSTEM "results/mq.tutorial.qnew2.out">
   4.134 +<!ENTITY interaction.mq.tutorial.qpop SYSTEM "results/mq.tutorial.qpop.out">
   4.135 +<!ENTITY interaction.mq.tutorial.qpush-a SYSTEM "results/mq.tutorial.qpush-a.out">
   4.136 +<!ENTITY interaction.mq.tutorial.qrefresh SYSTEM "results/mq.tutorial.qrefresh.out">
   4.137 +<!ENTITY interaction.mq.tutorial.qrefresh2 SYSTEM "results/mq.tutorial.qrefresh2.out">
   4.138 +<!ENTITY interaction.mq.tutorial.qseries SYSTEM "results/mq.tutorial.qseries.out">
   4.139 +<!ENTITY interaction.rename.divergent.clone SYSTEM "results/rename.divergent.clone.out">
   4.140 +<!ENTITY interaction.rename.divergent.merge SYSTEM "results/rename.divergent.merge.out">
   4.141 +<!ENTITY interaction.rename.divergent.rename.anne SYSTEM "results/rename.divergent.rename.anne.out">
   4.142 +<!ENTITY interaction.rename.divergent.rename.bob SYSTEM "results/rename.divergent.rename.bob.out">
   4.143 +<!ENTITY interaction.rollback.add SYSTEM "results/rollback.add.out">
   4.144 +<!ENTITY interaction.rollback.commit SYSTEM "results/rollback.commit.out">
   4.145 +<!ENTITY interaction.rollback.rollback SYSTEM "results/rollback.rollback.out">
   4.146 +<!ENTITY interaction.rollback.status SYSTEM "results/rollback.status.out">
   4.147 +<!ENTITY interaction.rollback.tip SYSTEM "results/rollback.tip.out">
   4.148 +<!ENTITY interaction.rollback.twice SYSTEM "results/rollback.twice.out">
   4.149 +<!ENTITY interaction.tag.init SYSTEM "results/tag.init.out">
   4.150 +<!ENTITY interaction.tag.log SYSTEM "results/tag.log.out">
   4.151 +<!ENTITY interaction.tag.log.v1.0 SYSTEM "results/tag.log.v1.0.out">
   4.152 +<!ENTITY interaction.tag.remove SYSTEM "results/tag.remove.out">
   4.153 +<!ENTITY interaction.tag.replace SYSTEM "results/tag.replace.out">
   4.154 +<!ENTITY interaction.tag.tag SYSTEM "results/tag.tag.out">
   4.155 +<!ENTITY interaction.tag.tags SYSTEM "results/tag.tags.out">
   4.156 +<!ENTITY interaction.tag.tip SYSTEM "results/tag.tip.out">
   4.157 +<!ENTITY interaction.template.simple.changelog SYSTEM "results/template.simple.changelog.out">
   4.158 +<!ENTITY interaction.template.simple.combine SYSTEM "results/template.simple.combine.out">
   4.159 +<!ENTITY interaction.template.simple.compact SYSTEM "results/template.simple.compact.out">
   4.160 +<!ENTITY interaction.template.simple.datekeyword SYSTEM "results/template.simple.datekeyword.out">
   4.161 +<!ENTITY interaction.template.simple.keywords SYSTEM "results/template.simple.keywords.out">
   4.162 +<!ENTITY interaction.template.simple.manyfilters SYSTEM "results/template.simple.manyfilters.out">
   4.163 +<!ENTITY interaction.template.simple.normal SYSTEM "results/template.simple.normal.out">
   4.164 +<!ENTITY interaction.template.simple.rev SYSTEM "results/template.simple.rev.out">
   4.165 +<!ENTITY interaction.template.simple.simplest SYSTEM "results/template.simple.simplest.out">
   4.166 +<!ENTITY interaction.template.simple.simplesub SYSTEM "results/template.simple.simplesub.out">
   4.167 +<!ENTITY interaction.template.svnstyle.id SYSTEM "results/template.svnstyle.id.out">
   4.168 +<!ENTITY interaction.template.svnstyle.result SYSTEM "results/template.svnstyle.result.out">
   4.169 +<!ENTITY interaction.template.svnstyle.short SYSTEM "results/template.svnstyle.short.out">
   4.170 +<!ENTITY interaction.template.svnstyle.simplest SYSTEM "results/template.svnstyle.simplest.out">
   4.171 +<!ENTITY interaction.template.svnstyle.style SYSTEM "results/template.svnstyle.style.out">
   4.172 +<!ENTITY interaction.template.svnstyle.syntax.error SYSTEM "results/template.svnstyle.syntax.error.out">
   4.173 +<!ENTITY interaction.template.svnstyle.syntax.input SYSTEM "results/template.svnstyle.syntax.input.out">
   4.174 +<!ENTITY interaction.template.svnstyle.template SYSTEM "results/template.svnstyle.template.out">
   4.175 +<!ENTITY interaction.tour-merge-conflict.commit SYSTEM "results/tour-merge-conflict.commit.out">
   4.176 +<!ENTITY interaction.tour-merge-conflict.cousin SYSTEM "results/tour-merge-conflict.cousin.out">
   4.177 +<!ENTITY interaction.tour-merge-conflict.merge SYSTEM "results/tour-merge-conflict.merge.out">
   4.178 +<!ENTITY interaction.tour-merge-conflict.pull SYSTEM "results/tour-merge-conflict.pull.out">
   4.179 +<!ENTITY interaction.tour-merge-conflict.son SYSTEM "results/tour-merge-conflict.son.out">
   4.180 +<!ENTITY interaction.tour-merge-conflict.wife SYSTEM "results/tour-merge-conflict.wife.out">
   4.181 +<!ENTITY interaction.tour.clone SYSTEM "results/tour.clone.out">
   4.182 +<!ENTITY interaction.tour.clone-pull SYSTEM "results/tour.clone-pull.out">
   4.183 +<!ENTITY interaction.tour.clone-push SYSTEM "results/tour.clone-push.out">
   4.184 +<!ENTITY interaction.tour.commit SYSTEM "results/tour.commit.out">
   4.185 +<!ENTITY interaction.tour.diff SYSTEM "results/tour.diff.out">
   4.186 +<!ENTITY interaction.tour.help SYSTEM "results/tour.help.out">
   4.187 +<!ENTITY interaction.tour.incoming SYSTEM "results/tour.incoming.out">
   4.188 +<!ENTITY interaction.tour.log SYSTEM "results/tour.log.out">
   4.189 +<!ENTITY interaction.tour.log-r SYSTEM "results/tour.log-r.out">
   4.190 +<!ENTITY interaction.tour.log-v SYSTEM "results/tour.log-v.out">
   4.191 +<!ENTITY interaction.tour.log-vp SYSTEM "results/tour.log-vp.out">
   4.192 +<!ENTITY interaction.tour.log.range SYSTEM "results/tour.log.range.out">
   4.193 +<!ENTITY interaction.tour.ls SYSTEM "results/tour.ls.out">
   4.194 +<!ENTITY interaction.tour.ls-a SYSTEM "results/tour.ls-a.out">
   4.195 +<!ENTITY interaction.tour.merge.cat SYSTEM "results/tour.merge.cat.out">
   4.196 +<!ENTITY interaction.tour.merge.clone SYSTEM "results/tour.merge.clone.out">
   4.197 +<!ENTITY interaction.tour.merge.commit SYSTEM "results/tour.merge.commit.out">
   4.198 +<!ENTITY interaction.tour.merge.dummy1 SYSTEM "results/tour.merge.dummy1.out">
   4.199 +<!ENTITY interaction.tour.merge.dummy2 SYSTEM "results/tour.merge.dummy2.out">
   4.200 +<!ENTITY interaction.tour.merge.dummy3 SYSTEM "results/tour.merge.dummy3.out">
   4.201 +<!ENTITY interaction.tour.merge.dummy4 SYSTEM "results/tour.merge.dummy4.out">
   4.202 +<!ENTITY interaction.tour.merge.heads SYSTEM "results/tour.merge.heads.out">
   4.203 +<!ENTITY interaction.tour.merge.merge SYSTEM "results/tour.merge.merge.out">
   4.204 +<!ENTITY interaction.tour.merge.parents SYSTEM "results/tour.merge.parents.out">
   4.205 +<!ENTITY interaction.tour.merge.pull SYSTEM "results/tour.merge.pull.out">
   4.206 +<!ENTITY interaction.tour.merge.tip SYSTEM "results/tour.merge.tip.out">
   4.207 +<!ENTITY interaction.tour.merge.update SYSTEM "results/tour.merge.update.out">
   4.208 +<!ENTITY interaction.tour.older SYSTEM "results/tour.older.out">
   4.209 +<!ENTITY interaction.tour.outgoing SYSTEM "results/tour.outgoing.out">
   4.210 +<!ENTITY interaction.tour.outgoing.net SYSTEM "results/tour.outgoing.net.out">
   4.211 +<!ENTITY interaction.tour.parents SYSTEM "results/tour.parents.out">
   4.212 +<!ENTITY interaction.tour.pull SYSTEM "results/tour.pull.out">
   4.213 +<!ENTITY interaction.tour.push SYSTEM "results/tour.push.out">
   4.214 +<!ENTITY interaction.tour.push.net SYSTEM "results/tour.push.net.out">
   4.215 +<!ENTITY interaction.tour.push.nothing SYSTEM "results/tour.push.nothing.out">
   4.216 +<!ENTITY interaction.tour.reclone SYSTEM "results/tour.reclone.out">
   4.217 +<!ENTITY interaction.tour.sed SYSTEM "results/tour.sed.out">
   4.218 +<!ENTITY interaction.tour.status SYSTEM "results/tour.status.out">
   4.219 +<!ENTITY interaction.tour.tip SYSTEM "results/tour.tip.out">
   4.220 +<!ENTITY interaction.tour.update SYSTEM "results/tour.update.out">
   4.221 +<!ENTITY interaction.tour.version SYSTEM "results/tour.version.out">
     5.1 --- a/en/examples/run-example	Mon Mar 09 21:40:12 2009 -0700
     5.2 +++ b/en/examples/run-example	Mon Mar 09 22:55:38 2009 -0700
     5.3 @@ -65,6 +65,8 @@
     5.4      
     5.5      timeout = 10
     5.6  
     5.7 +    entities = dict.fromkeys(l.rstrip() for l in open('auto-snippets.xml'))
     5.8 +
     5.9      def __init__(self, name, verbose, keep_change):
    5.10          self.name = name
    5.11          self.verbose = verbose
    5.12 @@ -240,6 +242,11 @@
    5.13                                  err |= self.rename_output(ofp_basename, ignore)
    5.14                              if out:
    5.15                                  ofp_basename = '%s.%s' % (self.name, out)
    5.16 +                                norm = os.path.normpath(ofp_basename)
    5.17 +                                example.entities[
    5.18 +                                    '<!ENTITY "interaction.%s" '
    5.19 +                                    'SYSTEM "results/%s.out">'
    5.20 +                                    % (norm, norm)] = 1
    5.21                                  read_hint = ofp_basename + ' '
    5.22                                  ofp = open(result_name(ofp_basename + '.tmp'),
    5.23                                             'w')
    5.24 @@ -348,11 +355,16 @@
    5.25      sys.exit(exit)
    5.26  
    5.27  def main(path='.'):
    5.28 +    if os.path.realpath(path).split(os.sep)[-1] != 'examples':
    5.29 +        print >> sys.stderr, 'Not being run from the examples directory!'
    5.30 +        sys.exit(1)
    5.31 +
    5.32      opts, args = getopt.getopt(sys.argv[1:], '?ahv',
    5.33                                 ['all', 'help', 'keep', 'verbose'])
    5.34      verbose = False
    5.35      run_all = False
    5.36      keep_change = False
    5.37 +
    5.38      for o, a in opts:
    5.39          if o in ('-h', '-?', '--help'):
    5.40              print_help(0)
    5.41 @@ -397,6 +409,11 @@
    5.42          print >> open(os.path.join(path, '.run'), 'w'), time.asctime()
    5.43      else:
    5.44          print_help(1, msg='no test names given, and --all not provided')
    5.45 +
    5.46 +    fp = open('auto-snippets.xml', 'w')
    5.47 +    for key in sorted(example.entities.iterkeys()):
    5.48 +        print >> fp, key
    5.49 +    fp.close()
    5.50      return errs
    5.51  
    5.52  if __name__ == '__main__':