hgbook

diff en/ch07-filenames.xml @ 567:8fcd44708f41

Uncomment all the mangled interaction examples.
author Bryan O'Sullivan <bos@serpentine.com>
date Mon Mar 09 23:22:09 2009 -0700 (2009-03-09)
parents 21c62e09b99f
children 13513d2a128d
line diff
     1.1 --- a/en/ch07-filenames.xml	Thu Mar 05 21:52:23 2009 +0200
     1.2 +++ b/en/ch07-filenames.xml	Mon Mar 09 23:22:09 2009 -0700
     1.3 @@ -16,15 +16,16 @@
     1.4  
     1.5      <para>If you explicitly name real files on the command line,
     1.6        Mercurial works with exactly those files, as you would expect.
     1.7 -      <!-- &interaction.filenames.files; --></para>
     1.8 +      &interaction.filenames.files;</para>
     1.9  
    1.10      <para>When you provide a directory name, Mercurial will interpret
    1.11        this as <quote>operate on every file in this directory and its
    1.12  	subdirectories</quote>. Mercurial traverses the files and
    1.13        subdirectories in a directory in alphabetical order.  When it
    1.14        encounters a subdirectory, it will traverse that subdirectory
    1.15 -      before continuing with the current directory. <!--
    1.16 -      &interaction.filenames.dirs; --></para>
    1.17 +      before continuing with the current directory.</para>
    1.18 +
    1.19 +      &interaction.filenames.dirs;
    1.20  
    1.21    </sect1>
    1.22    <sect1>
    1.23 @@ -53,8 +54,9 @@
    1.24        don't suit you.  If a command normally operates on the whole
    1.25        working directory, you can invoke it on just the current
    1.26        directory and its subdirectories by giving it the name
    1.27 -      <quote><filename class="directory">.</filename></quote>. <!--
    1.28 -      &interaction.filenames.wdir-subdir; --></para>
    1.29 +      <quote><filename class="directory">.</filename></quote>.</para>
    1.30 +
    1.31 +    &interaction.filenames.wdir-subdir;
    1.32  
    1.33      <para>Along the same lines, some commands normally print file
    1.34        names relative to the root of the repository, even if you're
    1.35 @@ -64,8 +66,9 @@
    1.36  	status</command> from a subdirectory, and get it to operate on
    1.37        the entire working directory while printing file names relative
    1.38        to our subdirectory, by passing it the output of the <command
    1.39 -	role="hg-cmd">hg root</command> command. <!--
    1.40 -      &interaction.filenames.wdir-relname; --></para>
    1.41 +	role="hg-cmd">hg root</command> command.</para>
    1.42 +
    1.43 +      &interaction.filenames.wdir-relname;
    1.44  
    1.45    </sect1>
    1.46    <sect1>
    1.47 @@ -139,18 +142,21 @@
    1.48  	when you're matching on glob patterns.</para>
    1.49  
    1.50        <para>The <quote><literal>*</literal></quote> character matches
    1.51 -	any string, within a single directory. <!--
    1.52 -	&interaction.filenames.glob.star; --></para>
    1.53 +	any string, within a single directory.</para>
    1.54 +
    1.55 +      &interaction.filenames.glob.star;
    1.56  
    1.57        <para>The <quote><literal>**</literal></quote> pattern matches
    1.58  	any string, and crosses directory boundaries.  It's not a
    1.59  	standard Unix glob token, but it's accepted by several popular
    1.60 -	Unix shells, and is very useful. <!--
    1.61 -	&interaction.filenames.glob.starstar; --></para>
    1.62 +	Unix shells, and is very useful.</para>
    1.63 +
    1.64 +      &interaction.filenames.glob.starstar;
    1.65  
    1.66        <para>The <quote><literal>?</literal></quote> pattern matches
    1.67 -	any single character. <!--
    1.68 -	&interaction.filenames.glob.question; --></para>
    1.69 +	any single character.</para>
    1.70 +
    1.71 +      &interaction.filenames.glob.question;
    1.72  
    1.73        <para>The <quote><literal>[</literal></quote> character begins a
    1.74  	<emphasis>character class</emphasis>.  This matches any single
    1.75 @@ -158,19 +164,23 @@
    1.76  	<quote><literal>]</literal></quote> character.  A class may
    1.77  	contain multiple <emphasis>range</emphasis>s of the form
    1.78  	<quote><literal>a-f</literal></quote>, which is shorthand for
    1.79 -	<quote><literal>abcdef</literal></quote>. <!--
    1.80 -	&interaction.filenames.glob.range; --> If the first character
    1.81 -	after the <quote><literal>[</literal></quote> in a character
    1.82 -	class is a <quote><literal>!</literal></quote>, it
    1.83 +	<quote><literal>abcdef</literal></quote>.</para>
    1.84 +
    1.85 +	&interaction.filenames.glob.range;
    1.86 +
    1.87 +      <para>If the first character after the
    1.88 +	<quote><literal>[</literal></quote> in a character class is a
    1.89 +	<quote><literal>!</literal></quote>, it
    1.90  	<emphasis>negates</emphasis> the class, making it match any
    1.91  	single character not in the class.</para>
    1.92  
    1.93        <para>A <quote><literal>{</literal></quote> begins a group of
    1.94  	subpatterns, where the whole group matches if any subpattern
    1.95  	in the group matches.  The <quote><literal>,</literal></quote>
    1.96 -	character separates subpatterns, and <quote><literal>}</literal></quote>
    1.97 -	ends the group. <!-- &interaction.filenames.glob.group;
    1.98 -	--></para>
    1.99 +	character separates subpatterns, and
   1.100 +	<quote><literal>}</literal></quote> ends the group.</para>
   1.101 +
   1.102 +      &interaction.filenames.glob.group;
   1.103  
   1.104        <sect3>
   1.105  	<title>Watch out!</title>
   1.106 @@ -180,8 +190,9 @@
   1.107  	  <quote><literal>*</literal></quote> match-any token, as this
   1.108  	  will only match within one directory.  Instead, use the
   1.109  	  <quote><literal>**</literal></quote> token.  This small
   1.110 -	  example illustrates the difference between the two. <!--
   1.111 -	  &interaction.filenames.glob.star-starstar; --></para>
   1.112 +	  example illustrates the difference between the two.</para>
   1.113 +
   1.114 +	  &interaction.filenames.glob.star-starstar;
   1.115  
   1.116        </sect3>
   1.117      </sect2>
   1.118 @@ -245,11 +256,15 @@
   1.119  
   1.120      <para>You can read a <option role="hg-opt-global">-I</option>
   1.121        filter as <quote>process only the files that match this
   1.122 -	filter</quote>. <!-- &interaction.filenames.filter.include;
   1.123 -      --> The <option role="hg-opt-global">-X</option> filter is best
   1.124 +	filter</quote>.</para>
   1.125 +
   1.126 +    &interaction.filenames.filter.include;
   1.127 +
   1.128 +    <para>The <option role="hg-opt-global">-X</option> filter is best
   1.129        read as <quote>process only the files that don't match this
   1.130 -	pattern</quote>. <!-- &interaction.filenames.filter.exclude;
   1.131 -      --></para>
   1.132 +	pattern</quote>.</para>
   1.133 +
   1.134 +    &interaction.filenames.filter.exclude;
   1.135  
   1.136    </sect1>
   1.137    <sect1>