hgbook
diff en/ch04-concepts.xml @ 640:a13813534ccd
Fix all xref to figs
author | Dongsheng Song <dongsheng.song@gmail.com> |
---|---|
date | Tue Mar 17 10:43:45 2009 +0800 (2009-03-17) |
parents | cfdb601a3c8b |
children |
line diff
1.1 --- a/en/ch04-concepts.xml Thu Mar 12 15:51:39 2009 +0800 1.2 +++ b/en/ch04-concepts.xml Tue Mar 17 10:43:45 2009 +0800 1.3 @@ -47,15 +47,17 @@ 1.4 file. The correspondence between a file in the working 1.5 directory and the filelog that tracks its history in the 1.6 repository is illustrated in figure <xref 1.7 + endterm="fig.concepts.filelog.caption" 1.8 linkend="fig.concepts.filelog"/>.</para> 1.9 1.10 <informalfigure id="fig.concepts.filelog"> 1.11 - <mediaobject><imageobject><imagedata 1.12 - fileref="images/filelog.png"/></imageobject><textobject><phrase>XXX 1.13 - add text</phrase></textobject> 1.14 - <caption><para>Relationships between files in working 1.15 - directory and filelogs in 1.16 - repository</para></caption></mediaobject> 1.17 + <mediaobject> 1.18 + <imageobject><imagedata fileref="images/filelog.png"/></imageobject> 1.19 + <textobject><phrase>XXX add text</phrase></textobject> 1.20 + <caption><para id="fig.concepts.filelog.caption">Relationships between 1.21 + files in working directory and filelogs in repository</para> 1.22 + </caption> 1.23 + </mediaobject> 1.24 </informalfigure> 1.25 1.26 </sect2> 1.27 @@ -97,14 +99,16 @@ 1.28 manifest. A revision of the manifest stores a pointer to a 1.29 single revision of each filelog tracked when that changeset 1.30 was created. These relationships are illustrated in figure 1.31 - <xref linkend="fig.concepts.metadata"/>.</para> 1.32 + <xref endterm="fig.concepts.metadata.caption" 1.33 + linkend="fig.concepts.metadata"/>.</para> 1.34 1.35 <informalfigure id="fig.concepts.metadata"> 1.36 - <mediaobject><imageobject><imagedata 1.37 - fileref="images/metadata.png"/></imageobject><textobject><phrase>XXX 1.38 - add text</phrase></textobject><caption><para>Metadata 1.39 - relationships</para></caption> 1.40 - </mediaobject> 1.41 + <mediaobject> 1.42 + <imageobject><imagedata fileref="images/metadata.png"/></imageobject> 1.43 + <textobject><phrase>XXX add text</phrase></textobject> 1.44 + <caption><para id="fig.concepts.metadata.caption">Metadata 1.45 + relationships</para></caption> 1.46 + </mediaobject> 1.47 </informalfigure> 1.48 1.49 <para>As the illustration shows, there is 1.50 @@ -185,11 +189,12 @@ 1.51 longer it takes to reconstruct a particular revision.</para> 1.52 1.53 <informalfigure id="fig.concepts.snapshot"> 1.54 - <mediaobject><imageobject><imagedata 1.55 - fileref="images/snapshot.png"/></imageobject><textobject><phrase>XXX 1.56 - add text</phrase></textobject><caption><para>Snapshot of 1.57 - a revlog, with incremental 1.58 - deltas</para></caption></mediaobject> 1.59 + <mediaobject> 1.60 + <imageobject><imagedata fileref="images/snapshot.png"/></imageobject> 1.61 + <textobject><phrase>XXX add text</phrase></textobject> 1.62 + <caption><para id="fig.concepts.snapshot.caption">Snapshot of 1.63 + a revlog, with incremental deltas</para></caption> 1.64 + </mediaobject> 1.65 </informalfigure> 1.66 1.67 <para>The innovation that Mercurial applies to this problem is 1.68 @@ -201,7 +206,8 @@ 1.69 quickly. This approach works so well that it has since been 1.70 copied by several other revision control systems.</para> 1.71 1.72 - <para>Figure <xref linkend="fig.concepts.snapshot"/> illustrates 1.73 + <para>Figure <xref endterm="fig.concepts.snapshot.caption" 1.74 + linkend="fig.concepts.snapshot"/> illustrates 1.75 the idea. In an entry in a revlog's index file, Mercurial 1.76 stores the range of entries from the data file that it must 1.77 read to reconstruct a particular revision.</para> 1.78 @@ -273,7 +279,8 @@ 1.79 <quote>there is no parent here</quote>. This hash is simply a 1.80 string of zeroes.</para> 1.81 1.82 - <para>In figure <xref linkend="fig.concepts.revlog"/>, you can see 1.83 + <para>In figure <xref endterm="fig.concepts.revlog.caption" 1.84 + linkend="fig.concepts.revlog"/>, you can see 1.85 an example of the conceptual structure of a revlog. Filelogs, 1.86 manifests, and changelogs all have this same structure; they 1.87 differ only in the kind of data stored in each delta or 1.88 @@ -289,9 +296,12 @@ 1.89 revision IDs in its parent slots.</para> 1.90 1.91 <informalfigure id="fig.concepts.revlog"> 1.92 - <mediaobject><imageobject><imagedata 1.93 - fileref="images/revlog.png"/></imageobject><textobject><phrase>XXX 1.94 - add text</phrase></textobject></mediaobject> 1.95 + <mediaobject> 1.96 + <imageobject><imagedata fileref="images/revlog.png"/></imageobject> 1.97 + <textobject><phrase>XXX add text</phrase></textobject> 1.98 + <caption><para id="fig.concepts.revlog.caption">Revision in revlog</para> 1.99 + </caption> 1.100 + </mediaobject> 1.101 </informalfigure> 1.102 1.103 </sect1> 1.104 @@ -338,25 +348,29 @@ 1.105 changeset</emphasis> when you perform a commit.</para> 1.106 1.107 <informalfigure id="fig.concepts.wdir"> 1.108 - <mediaobject><imageobject><imagedata 1.109 - fileref="images/wdir.png"/></imageobject><textobject><phrase>XXX 1.110 - add text</phrase></textobject><caption><para>The working 1.111 - directory can have two 1.112 - parents</para></caption></mediaobject> 1.113 + <mediaobject> 1.114 + <imageobject><imagedata fileref="images/wdir.png"/></imageobject> 1.115 + <textobject><phrase>XXX add text</phrase></textobject> 1.116 + <caption><para id="fig.concepts.wdir.caption">The working 1.117 + directory can have two parents</para></caption> 1.118 + </mediaobject> 1.119 </informalfigure> 1.120 1.121 - <para>Figure <xref linkend="fig.concepts.wdir"/> shows the 1.122 + <para>Figure <xref endterm="fig.concepts.wdir.caption" 1.123 + linkend="fig.concepts.wdir"/> shows the 1.124 normal state of the working directory, where it has a single 1.125 changeset as parent. That changeset is the 1.126 <emphasis>tip</emphasis>, the newest changeset in the 1.127 repository that has no children.</para> 1.128 1.129 <informalfigure id="fig.concepts.wdir-after-commit"> 1.130 - <mediaobject><imageobject><imagedata 1.131 - fileref="images/wdir-after-commit.png"/></imageobject><textobject><phrase>XXX 1.132 - add text</phrase></textobject><caption><para>The working 1.133 - directory gains new parents after a 1.134 - commit</para></caption></mediaobject> 1.135 + <mediaobject> 1.136 + <imageobject><imagedata fileref="images/wdir-after-commit.png"/> 1.137 + </imageobject> 1.138 + <textobject><phrase>XXX add text</phrase></textobject> 1.139 + <caption><para id="fig.concepts.wdir-after-commit.caption">The working 1.140 + directory gains new parents after a commit</para></caption> 1.141 + </mediaobject> 1.142 </informalfigure> 1.143 1.144 <para>It's useful to think of the working directory as 1.145 @@ -370,7 +384,8 @@ 1.146 <para>After a commit, Mercurial will update the parents of the 1.147 working directory, so that the first parent is the ID of the 1.148 new changeset, and the second is the null ID. This is shown 1.149 - in figure <xref linkend="fig.concepts.wdir-after-commit"/>. 1.150 + in figure <xref endterm="fig.concepts.wdir-after-commit.caption" 1.151 + linkend="fig.concepts.wdir-after-commit"/>. 1.152 Mercurial 1.153 doesn't touch any of the files in the working directory when 1.154 you commit; it just modifies the dirstate to note its new 1.155 @@ -389,14 +404,17 @@ 1.156 interested in, and then examine the files in the working 1.157 directory directly to see their contents as they were when you 1.158 committed that changeset. The effect of this is shown in 1.159 - figure <xref linkend="fig.concepts.wdir-pre-branch"/>.</para> 1.160 + figure <xref endterm="fig.concepts.wdir-pre-branch.caption" 1.161 + linkend="fig.concepts.wdir-pre-branch"/>.</para> 1.162 1.163 <informalfigure id="fig.concepts.wdir-pre-branch"> 1.164 - <mediaobject><imageobject><imagedata 1.165 - fileref="images/wdir-pre-branch.png"/></imageobject><textobject><phrase>XXX 1.166 - add text</phrase></textobject><caption><para>The working 1.167 - directory, updated to an older 1.168 - changeset</para></caption></mediaobject> 1.169 + <mediaobject> 1.170 + <imageobject><imagedata fileref="images/wdir-pre-branch.png"/> 1.171 + </imageobject> 1.172 + <textobject><phrase>XXX add text</phrase></textobject> 1.173 + <caption><para id="fig.concepts.wdir-pre-branch.caption">The working 1.174 + directory, updated to an older changeset</para></caption> 1.175 + </mediaobject> 1.176 </informalfigure> 1.177 1.178 <para>Having updated the working directory to an older 1.179 @@ -408,14 +426,17 @@ 1.180 contains two changesets that have no children; we call these 1.181 <emphasis>heads</emphasis>. You can see the structure that 1.182 this creates in figure <xref 1.183 + endterm="fig.concepts.wdir-branch.caption" 1.184 linkend="fig.concepts.wdir-branch"/>.</para> 1.185 1.186 <informalfigure id="fig.concepts.wdir-branch"> 1.187 - <mediaobject><imageobject><imagedata 1.188 - fileref="images/wdir-branch.png"/></imageobject><textobject><phrase>XXX 1.189 - add text</phrase></textobject><caption><para>After a 1.190 - commit made while synced to an older 1.191 - changeset</para></caption></mediaobject> 1.192 + <mediaobject> 1.193 + <imageobject><imagedata fileref="images/wdir-branch.png"/> 1.194 + </imageobject> 1.195 + <textobject><phrase>XXX add text</phrase></textobject> 1.196 + <caption><para id="fig.concepts.wdir-branch.caption">After a 1.197 + commit made while synced to an older changeset</para></caption> 1.198 + </mediaobject> 1.199 </informalfigure> 1.200 1.201 <note> 1.202 @@ -449,13 +470,17 @@ 1.203 command, Mercurial leaves the first parent of the working 1.204 directory unchanged, and sets the second parent to the 1.205 changeset you're merging with, as shown in figure <xref 1.206 + endterm="fig.concepts.wdir-merge.caption" 1.207 linkend="fig.concepts.wdir-merge"/>.</para> 1.208 1.209 <informalfigure id="fig.concepts.wdir-merge"> 1.210 - <mediaobject><imageobject><imagedata 1.211 - fileref="images/wdir-merge.png"/></imageobject><textobject><phrase>XXX 1.212 - add text</phrase></textobject><caption><para>Merging two 1.213 - heads</para></caption></mediaobject> 1.214 + <mediaobject> 1.215 + <imageobject><imagedata fileref="images/wdir-merge.png"/> 1.216 + </imageobject> 1.217 + <textobject><phrase>XXX add text</phrase></textobject> 1.218 + <caption><para id="fig.concepts.wdir-merge.caption">Merging two 1.219 + heads</para></caption> 1.220 + </mediaobject> 1.221 </informalfigure> 1.222 1.223 <para>Mercurial also has to modify the working directory, to 1.224 @@ -582,8 +607,8 @@ 1.225 1.226 <para>Appending to files isn't the whole story when it comes to 1.227 guaranteeing that a reader won't see a partial write. If you 1.228 - recall figure <xref linkend="fig.concepts.metadata"/>, 1.229 - revisions in the 1.230 + recall figure <xref endterm="fig.concepts.metadata.caption" 1.231 + linkend="fig.concepts.metadata"/>, revisions in the 1.232 changelog point to revisions in the manifest, and revisions in 1.233 the manifest point to revisions in filelogs. This hierarchy 1.234 is deliberate.</para>