# HG changeset patch # User Dongsheng Song # Date 1236844299 -28800 # Node ID cfdb601a3c8bf12ab71a7bbff71cf333b480dc4c # Parent 3c5e1c03cc3ef5ec9e9b4bd9a87ef8ebe5578675 Fix imagedata fileref in xml files, and replace ':' with '.' in id attribute diff -r 3c5e1c03cc3e -r cfdb601a3c8b en/00book.xml --- a/en/00book.xml Thu Mar 12 15:47:15 2009 +0800 +++ b/en/00book.xml Thu Mar 12 15:51:39 2009 +0800 @@ -1,7 +1,7 @@ - @@ -39,6 +39,11 @@ Mercurial: The Definitive Guide + + + Compiled from $rev_id$ diff -r 3c5e1c03cc3e -r cfdb601a3c8b en/appA-cmdref.xml --- a/en/appA-cmdref.xml Thu Mar 12 15:47:15 2009 +0800 +++ b/en/appA-cmdref.xml Thu Mar 12 15:51:39 2009 +0800 @@ -12,7 +12,7 @@ Show differences between revisions for the specified files or directories, using the unified diff format. For a description of the -unified diff format, see section . +unified diff format, see section . By default, this command does not print diffs for files that Mercurial considers to contain binary data. To control this behaviour, see the @@ -158,7 +158,7 @@ Tips and tricks - + Why do the results of <command role="hg-cmd">hg diff</command> and <command role="hg-cmd">hg status</command> differ? When you run the hg status command, you'll see a list of files diff -r 3c5e1c03cc3e -r cfdb601a3c8b en/appB-mq-ref.xml --- a/en/appB-mq-ref.xml Thu Mar 12 15:47:15 2009 +0800 +++ b/en/appB-mq-ref.xml Thu Mar 12 15:51:39 2009 +0800 @@ -1,10 +1,10 @@ - + Mercurial Queues reference - + MQ command reference For an overview of the commands provided by MQ, use the @@ -295,7 +295,7 @@ role="hg-ext-mq">qpop. - + <command role="hg-ext-mq">qpush</command>&emdash;push patches onto the stack diff -r 3c5e1c03cc3e -r cfdb601a3c8b en/appC-srcinstall.xml --- a/en/appC-srcinstall.xml Thu Mar 12 15:47:15 2009 +0800 +++ b/en/appC-srcinstall.xml Thu Mar 12 15:51:39 2009 +0800 @@ -1,10 +1,10 @@ - + Installing Mercurial from source - + On a Unix-like system If you are using a Unix-like system that has a sufficiently diff -r 3c5e1c03cc3e -r cfdb601a3c8b en/appD-license.xml --- a/en/appD-license.xml Thu Mar 12 15:47:15 2009 +0800 +++ b/en/appD-license.xml Thu Mar 12 15:51:39 2009 +0800 @@ -1,6 +1,6 @@ - + Open Publication License @@ -32,7 +32,7 @@ The reference must be immediately followed with any options elected by the author(s) and/or publisher of the document (see - section ). + section ). Commercial redistribution of Open Publication-licensed material is permitted. @@ -133,7 +133,7 @@ - + License options The author(s) and/or publisher of an Open diff -r 3c5e1c03cc3e -r cfdb601a3c8b en/ch00-preface.xml --- a/en/ch00-preface.xml Thu Mar 12 15:47:15 2009 +0800 +++ b/en/ch00-preface.xml Thu Mar 12 15:51:39 2009 +0800 @@ -1,6 +1,6 @@ - + Preface Distributed revision control is a relatively new territory, @@ -51,7 +51,7 @@ example can show up as having occurred during the same second. You can see this occur in the bisect example in section , for instance. + id="sec.undo.bisect"/>, for instance. So when you're reading examples, don't place too much weight on the dates or times you see in the output of commands. But diff -r 3c5e1c03cc3e -r cfdb601a3c8b en/ch01-intro.xml --- a/en/ch01-intro.xml Thu Mar 12 15:47:15 2009 +0800 +++ b/en/ch01-intro.xml Thu Mar 12 15:51:39 2009 +0800 @@ -1,6 +1,6 @@ - + Introduction @@ -50,7 +50,7 @@ fact, a really good revision control tool will even help you to efficiently figure out exactly when a problem was introduced (see section for details). + linkend="sec.undo.bisect"/> for details). It will help you to work simultaneously on, and manage the drift between, multiple versions of your project. diff -r 3c5e1c03cc3e -r cfdb601a3c8b en/ch02-tour-basic.xml --- a/en/ch02-tour-basic.xml Thu Mar 12 15:47:15 2009 +0800 +++ b/en/ch02-tour-basic.xml Thu Mar 12 15:51:39 2009 +0800 @@ -1,10 +1,10 @@ - + A tour of Mercurial: the basics - + Installing Mercurial on your system Prebuilt binary packages of Mercurial are available for @@ -250,7 +250,7 @@ log is purely a summary; it is missing a lot of detail. - Figure provides a + Figure provides a graphical representation of the history of the hello repository, to make it a little easier to see which direction history is @@ -258,9 +258,9 @@ several times in this chapter and the chapter that follows. - + - + XXX add text Graphical history of the hello @@ -361,7 +361,7 @@ ) option. This displays the content of a change as a unified diff (if you've never seen a unified diff before, - see section for an + see section for an overview). &interaction.tour.log-vp; @@ -519,7 +519,7 @@ username entry, that will be used next. To see what the contents of this file should look like, refer to section + linkend="sec.tour-basic.username"/> below. If you have set the EMAIL environment variable, this will be used @@ -543,7 +543,7 @@ and most robust way to set a username for yourself is by creating a .hgrc file; see below for details. - + Creating a Mercurial configuration file To set a user name, use your favourite editor @@ -684,7 +684,7 @@ look at a few ways that we can propagate this change into other repositories. - + Pulling changes from another repository To get started, let's clone our original hello repository, @@ -734,7 +734,7 @@ We have so far glossed over the relationship between a repository and its working directory. The hg pull command that we ran in - section brought changes + section brought changes into the repository, but if we check, there's no sign of those changes in the working directory. This is because hg pull does not (by default) touch @@ -761,7 +761,7 @@ If you look back at the output of hg pull in section when we ran it without , you can see that it printed a helpful reminder that we'd have to take an explicit step to update the working directory: @@ -775,7 +775,7 @@ &interaction.tour.parents; If you look back at figure , + linkend="fig.tour-basic.history"/>, you'll see arrows connecting each changeset. The node that the arrow leads from in each case is a parent, and the node that the arrow leads diff -r 3c5e1c03cc3e -r cfdb601a3c8b en/ch03-tour-merge.xml --- a/en/ch03-tour-merge.xml Thu Mar 12 15:47:15 2009 +0800 +++ b/en/ch03-tour-merge.xml Thu Mar 12 15:51:39 2009 +0800 @@ -1,6 +1,6 @@ - + A tour of Mercurial: merging work @@ -38,13 +38,13 @@ hello.c with different contents. The histories of the two repositories have also diverged, as illustrated in figure . + linkend="fig.tour-merge.sep-repos"/>. &interaction.tour.merge.cat; - + - + XXX add text Divergent recent histories of the my-hello and - + XXX + fileref="images/tour-merge-pull.png"/>XXX add text Repository contents after pulling from my-hello into @@ -82,14 +82,14 @@ - In figure , you can + In figure , you can see the effect of the pull from my-hello into my-new-hello. The history that was already present in my-new-hello is untouched, but a new revision has been added. By referring to figure , we can see that the + linkend="fig.tour-merge.sep-repos"/>, we can see that the changeset ID remains the same in the new repository, but the revision number has changed. (This, incidentally, is a fine example of why it's @@ -118,10 +118,10 @@ &interaction.tour.merge.merge; - + XXX + fileref="images/tour-merge-merge.png"/>XXX add text Working directory and repository during merge, and following commit @@ -155,7 +155,7 @@ &interaction.tour.merge.tip; In figure , you can see a + linkend="fig.tour-merge.merge"/>, you can see a representation of what happens to the working directory during the merge, and how this affects the repository when the commit happens. During the merge, the working directory has two @@ -176,14 +176,14 @@ - - + + XXX add text Conflicting changes to a document - Figure illustrates + Figure illustrates an instance of two conflicting changes to a document. We started with a single version of the file; then we made some changes; while someone else made different changes to the same @@ -213,7 +213,7 @@ kdiff3, which I'll use to describe the features that are common to graphical file merging tools. You can see a screenshot of kdiff3 in action in - figure . The kind of + figure . The kind of merge it is performing is called a three-way merge, because there are three different versions of the file of interest to us. The tool thus splits the upper @@ -243,9 +243,9 @@ in any of them, the others are updated to display the corresponding sections of their respective files. - - XXX + + XXX add text Using kdiff3 to merge versions of a file @@ -270,7 +270,7 @@ A worked example In this example, we will reproduce the file modification - history of figure + history of figure above. Let's begin by creating a repository with a base version of our document. @@ -331,7 +331,7 @@ - + Simplifying the pull-merge-commit sequence The process of merging changes as outlined above is diff -r 3c5e1c03cc3e -r cfdb601a3c8b en/ch04-concepts.xml --- a/en/ch04-concepts.xml Thu Mar 12 15:47:15 2009 +0800 +++ b/en/ch04-concepts.xml Thu Mar 12 15:51:39 2009 +0800 @@ -1,6 +1,6 @@ - + Behind the scenes @@ -47,11 +47,11 @@ file. The correspondence between a file in the working directory and the filelog that tracks its history in the repository is illustrated in figure . + linkend="fig.concepts.filelog"/>. - + XXX + fileref="images/filelog.png"/>XXX add text Relationships between files in working directory and filelogs in @@ -97,11 +97,11 @@ manifest. A revision of the manifest stores a pointer to a single revision of each filelog tracked when that changeset was created. These relationships are illustrated in figure - . + . - + XXX + fileref="images/metadata.png"/>XXX add textMetadata relationships @@ -145,7 +145,7 @@ doesn't need to treat text as special. - + Safe operation Mercurial only ever appends data to @@ -184,9 +184,9 @@ file accumulates, the more revisions you must read, hence the longer it takes to reconstruct a particular revision. - + XXX + fileref="images/snapshot.png"/>XXX add textSnapshot of a revlog, with incremental deltas @@ -201,7 +201,7 @@ quickly. This approach works so well that it has since been copied by several other revision control systems. - Figure illustrates + Figure illustrates the idea. In an entry in a revlog's index file, Mercurial stores the range of entries from the data file that it must read to reconstruct a particular revision. @@ -273,7 +273,7 @@ there is no parent here. This hash is simply a string of zeroes. - In figure , you can see + In figure , you can see an example of the conceptual structure of a revlog. Filelogs, manifests, and changelogs all have this same structure; they differ only in the kind of data stored in each delta or @@ -288,9 +288,9 @@ revision that represents a merge between branches has two normal revision IDs in its parent slots. - + XXX + fileref="images/revlog.png"/>XXX add text @@ -337,23 +337,23 @@ dirstate as the parents of a new changeset when you perform a commit. - + XXX + fileref="images/wdir.png"/>XXX add textThe working directory can have two parents - Figure shows the + Figure shows the normal state of the working directory, where it has a single changeset as parent. That changeset is the tip, the newest changeset in the repository that has no children. - + XXX + fileref="images/wdir-after-commit.png"/>XXX add textThe working directory gains new parents after a commit @@ -370,7 +370,7 @@ After a commit, Mercurial will update the parents of the working directory, so that the first parent is the ID of the new changeset, and the second is the null ID. This is shown - in figure . + in figure . Mercurial doesn't touch any of the files in the working directory when you commit; it just modifies the dirstate to note its new @@ -389,11 +389,11 @@ interested in, and then examine the files in the working directory directly to see their contents as they were when you committed that changeset. The effect of this is shown in - figure . + figure . - + XXX + fileref="images/wdir-pre-branch.png"/>XXX add textThe working directory, updated to an older changeset @@ -408,11 +408,11 @@ contains two changesets that have no children; we call these heads. You can see the structure that this creates in figure . + linkend="fig.concepts.wdir-branch"/>. - + XXX + fileref="images/wdir-branch.png"/>XXX add textAfter a commit made while synced to an older changeset @@ -449,11 +449,11 @@ command, Mercurial leaves the first parent of the working directory unchanged, and sets the second parent to the changeset you're merging with, as shown in figure . + linkend="fig.concepts.wdir-merge"/>. - + XXX + fileref="images/wdir-merge.png"/>XXX add textMerging two heads @@ -582,7 +582,7 @@ Appending to files isn't the whole story when it comes to guaranteeing that a reader won't see a partial write. If you - recall figure , + recall figure , revisions in the changelog point to revisions in the manifest, and revisions in the manifest point to revisions in filelogs. This hierarchy diff -r 3c5e1c03cc3e -r cfdb601a3c8b en/ch05-daily.xml --- a/en/ch05-daily.xml Thu Mar 12 15:47:15 2009 +0800 +++ b/en/ch05-daily.xml Thu Mar 12 15:51:39 2009 +0800 @@ -1,6 +1,6 @@ - + Mercurial in daily use @@ -274,7 +274,7 @@ &interaction.daily.copy.merge; - + Why should changes follow copies? This behaviour, of changes to a file propagating out to @@ -328,7 +328,7 @@ Unix-like systems, that's cp) to make a copy of a file, then hg add the new copy by hand. Before you do so, though, please do - reread section , and make + reread section , and make an informed decision that this behaviour is not appropriate to your specific case. @@ -532,7 +532,7 @@ For more information about the hg revert command, and details about how to deal with changes you have already committed, see chapter . + linkend="chap.undo"/>. diff -r 3c5e1c03cc3e -r cfdb601a3c8b en/ch06-collab.xml --- a/en/ch06-collab.xml Thu Mar 12 15:47:15 2009 +0800 +++ b/en/ch06-collab.xml Thu Mar 12 15:51:39 2009 +0800 @@ -1,6 +1,6 @@ - + Collaborating with other people @@ -47,12 +47,12 @@ first is using the hg serve command, which is best suited to short-term lightweight serving. See section below for details of how to use + linkend="sec.collab.serve"/> below for details of how to use this command. If you have a long-lived repository that you'd like to make permanently available, Mercurial has built-in support for the CGI (Common Gateway Interface) standard, which all common web servers support. See section for details of CGI + linkend="sec.collab.cgi"/> for details of CGI configuration. @@ -120,7 +120,7 @@ role="hg-cmd">hg serve does not require any fancy server infrastructure. You can get started with hg serve in moments, by reading - section below. Then simply + section below. Then simply tell the person next to you that you're running a server, send the URL to them in an instant message, and you immediately have a @@ -165,9 +165,9 @@ In this kind of scenario, people usually use the ssh protocol to securely push changes to the central repository, as documented in section . It's also + linkend="sec.collab.ssh"/>. It's also usual to publish a read-only copy of the repository over HTTP - using CGI, as in section . + using CGI, as in section . Publishing over HTTP satisfies the needs of people who don't have push access, and those who want to use web browsers to browse the repository's @@ -270,9 +270,9 @@ People working on an individual branch are typically quite isolated from developments on other branches. - + XXX + fileref="images/feature-branches.png"/>XXX add textFeature branches @@ -408,7 +408,7 @@ in which your team may be moving at once. Even though this subject is intimately related to how your team collaborates, it's dense enough to merit treatment of its own, in chapter - . + . @@ -419,7 +419,7 @@ serving data to your collaborators. - + Informal sharing with <command role="hg-cmd">hg serve</command> @@ -498,7 +498,7 @@ - + Using the Secure Shell (ssh) protocol You can pull and push changes securely over a network @@ -859,7 +859,7 @@ - + Serving over HTTP using CGI Depending on how ambitious you are, configuring Mercurial's @@ -951,7 +951,7 @@ must not be writable by others. chmod 755 ~/public_html - + What could <emphasis>possibly</emphasis> go wrong? @@ -1118,7 +1118,7 @@ display an empty list of repositories. If you get a blank window or error message, try walking through the list of potential problems in section . + linkend="sec.collab.wtf"/>. The hgwebdir.cgi script relies on an external configuration file. By default, @@ -1317,7 +1317,7 @@ default and gitweb (the latter is much more visually attractive). You can also specify a custom template of your own; see chapter - for details. + for details. Here, you can see how to enable the gitweb style. [web] style = gitweb diff -r 3c5e1c03cc3e -r cfdb601a3c8b en/ch07-filenames.xml --- a/en/ch07-filenames.xml Thu Mar 12 15:47:15 2009 +0800 +++ b/en/ch07-filenames.xml Thu Mar 12 15:51:39 2009 +0800 @@ -1,6 +1,6 @@ - + File names and pattern matching @@ -274,7 +274,7 @@ XXX. - + Case sensitivity If you're working in a mixed development environment that diff -r 3c5e1c03cc3e -r cfdb601a3c8b en/ch08-branch.xml --- a/en/ch08-branch.xml Thu Mar 12 15:47:15 2009 +0800 +++ b/en/ch08-branch.xml Thu Mar 12 15:51:39 2009 +0800 @@ -1,6 +1,6 @@ - + Managing releases and branchy development diff -r 3c5e1c03cc3e -r cfdb601a3c8b en/ch09-undo.xml --- a/en/ch09-undo.xml Thu Mar 12 15:47:15 2009 +0800 +++ b/en/ch09-undo.xml Thu Mar 12 15:51:39 2009 +0800 @@ -1,6 +1,6 @@ - + Finding and fixing mistakes @@ -27,17 +27,17 @@ less annoying. - + Rolling back a transaction - In section , I mentioned + In section , I mentioned that Mercurial treats each modification of a repository as a transaction. Every time you commit a changeset or pull changes from another repository, Mercurial remembers what you did. You can undo, or roll back, exactly one of these actions using the hg rollback command. (See - section for an + section for an important caveat about the use of this command.) Here's a mistake that I often find myself making: @@ -111,7 +111,7 @@ need to undo this mistake. - + Rolling back is useless once you've pushed The value of the hg @@ -214,7 +214,7 @@ the file to its unmodified contents. - + File management errors The hg revert command is @@ -306,7 +306,7 @@ modifying or erasing it. It's the right tool to use if you're fixing bugs, but not if you're trying to undo some change that has catastrophic consequences. To deal with those, see section - . + . Backing out a changeset @@ -354,13 +354,13 @@ that hg backout has created is a child of the changeset we backed out. It's easier to see this in figure , which presents a graphical + linkend="fig.undo.backout"/>, which presents a graphical view of the change history. As you can see, the history is nice and linear. - + XXX + fileref="images/undo-simple.png"/>XXX add textBacking out a change using the hg backout @@ -393,7 +393,7 @@ &interaction.backout.non-tip.cat; As the graphical history in figure illustrates, Mercurial + linkend="fig.undo.backout-non-tip"/> illustrates, Mercurial actually commits two changes in this kind of situation (the box-shaped nodes are the ones that Mercurial commits automatically). Before Mercurial begins the backout @@ -406,9 +406,9 @@ % TODO: to me it looks like mercurial doesn't commit the second merge automatically! - + XXX + fileref="images/undo-non-tip.png"/>XXX add textAutomated backout of a non-tip change using the hg backout @@ -465,15 +465,15 @@ Again, it's easier to see what has happened by looking at a graph of the revision history, in figure . This makes it clear + linkend="fig.undo.backout-manual"/>. This makes it clear that when we use hg backout to back out a change other than the tip, Mercurial adds a new head to the repository (the change it committed is box-shaped). - + XXX + fileref="images/undo-manual.png"/>XXX add textBacking out a change using the hg backout @@ -509,11 +509,11 @@ Afterwards, the graphical history of our repository looks like figure - . + . - + XXX + fileref="images/undo-manual-merge.png"/>XXX add textManually merging a backout change @@ -584,7 +584,7 @@ are likely to have broken the context that patch uses to determine whether it can apply a patch (if this sounds like gibberish, see for a + linkend="sec.mq.patch"/> for a discussion of the patch command). Also, Mercurial's merge machinery will handle files and directories being renamed, permission changes, and modifications to binary @@ -593,7 +593,7 @@ - + Changes that should never have been Most of the time, the hg @@ -623,7 +623,7 @@ been pushed or pulled into another repository. That's when you can safely use the hg rollback command, as I detailed in section . + linkend="sec.undo.rollback"/>. After you've pushed a bad change to another repository, you could still use hg @@ -664,7 +664,7 @@ central repository. By configuring some hooks on that repository to validate - incoming changesets (see chapter ), + incoming changesets (see chapter ), you can automatically prevent some kinds of bad changeset from being pushed to the central repository at all. With such a @@ -679,7 +679,7 @@ - + Finding the source of a bug While it's all very well to be able to back out a changeset diff -r 3c5e1c03cc3e -r cfdb601a3c8b en/ch10-hook.xml --- a/en/ch10-hook.xml Thu Mar 12 15:47:15 2009 +0800 +++ b/en/ch10-hook.xml Thu Mar 12 15:51:39 2009 +0800 @@ -1,6 +1,6 @@ - + Handling repository events with hooks @@ -19,7 +19,7 @@ Here is a brief list of the hooks that Mercurial supports. We will revisit each of these hooks in more detail later, in - section . + section . changegroup: This @@ -343,7 +343,7 @@ - + A short tutorial on using hooks It is easy to write a Mercurial hook. Let's start with a @@ -400,11 +400,11 @@ message that contains the hook name and extension, so using a descriptive extension could give you an immediate hint as to why the hook failed (see section for an example). + linkend="sec.hook.perm"/> for an example). - + Controlling whether an activity can proceed In our earlier examples, we used the - + Choosing how your hook should run You can write a hook either as a normal @@ -490,7 +490,7 @@ - + Hook parameters Mercurial calls each hook with a set of well-defined @@ -888,7 +888,7 @@ - + Configuring the <literal role="hook">bugzilla</literal> hook @@ -1101,7 +1101,7 @@ Recall from section above that the user + linkend="sec.hook.bugzilla.config"/> above that the user that runs the Mercurial process on the server is also the one that will run the processmail script. The processmail script @@ -1259,7 +1259,7 @@ out email about changes that remote users pushed into this repository via a server, for example. See section for the sources you can + linkend="sec.hook.sources"/> for the sources you can specify here. @@ -1318,7 +1318,7 @@ - + Information for writers of hooks @@ -1426,7 +1426,7 @@ transferred to or from. - + Sources of changesets Mercurial will tell a hook what means are, or were, used @@ -1458,7 +1458,7 @@ - + Where changes are going&emdash;remote repository URLs @@ -1500,7 +1500,7 @@ Hook reference - + <literal role="hook">changegroup</literal>&emdash;after remote changesets added @@ -1535,26 +1535,26 @@ source: A string. The source of these changes. See section for details. + linkend="sec.hook.sources"/> for details. url: A URL. The location of the remote repository, if known. See section for more + linkend="sec.hook.url"/> for more information. See also: incoming (section - ), ), prechangegroup (section ), ), pretxnchangegroup (section ) + linkend="sec.hook.pretxnchangegroup"/>) - + <literal role="hook">commit</literal>&emdash;after a new changeset is created @@ -1580,13 +1580,13 @@ See also: precommit - (section ), ), pretxncommit (section ) + linkend="sec.hook.pretxncommit"/>) - + <literal role="hook">incoming</literal>&emdash;after one remote changeset is added @@ -1599,7 +1599,7 @@ You can use this hook for the same purposes as the changegroup hook (section ); it's simply + linkend="sec.hook.changegroup"/>); it's simply more convenient sometimes to run a hook once per group of changesets, while other times it's handier once per changeset. @@ -1613,26 +1613,26 @@ source: A string. The source of these changes. See section for details. + linkend="sec.hook.sources"/> for details. url: A URL. The location of the remote repository, if known. See section for more + linkend="sec.hook.url"/> for more information. See also: changegroup - (section ) ) prechangegroup (section ), ), pretxnchangegroup (section ) + linkend="sec.hook.pretxnchangegroup"/>) - + <literal role="hook">outgoing</literal>&emdash;after changesets are propagated @@ -1656,7 +1656,7 @@ source: A string. The source of the of the operation (see section ). If a remote + linkend="sec.hook.sources"/>). If a remote client pulled changes from this repository, source will be serve. If the client that obtained @@ -1669,17 +1669,17 @@ url: A URL. The location of the remote repository, if known. See section for more + linkend="sec.hook.url"/> for more information. See also: preoutgoing - (section ) + (section ) - + <literal role="hook">prechangegroup</literal>&emdash;before starting to add remote changesets @@ -1706,26 +1706,26 @@ source: A string. The source of these changes. See section for details. + linkend="sec.hook.sources"/> for details. url: A URL. The location of the remote repository, if known. See section for more + linkend="sec.hook.url"/> for more information. See also: changegroup - (section ), ), incoming (section ), , ), , pretxnchangegroup (section ) + linkend="sec.hook.pretxnchangegroup"/>) - + <literal role="hook">precommit</literal>&emdash;before starting to commit a changeset @@ -1759,13 +1759,13 @@ See also: commit (section - ), ), pretxncommit (section ) + linkend="sec.hook.pretxncommit"/>) - + <literal role="hook">preoutgoing</literal>&emdash;before starting to propagate changesets @@ -1783,27 +1783,27 @@ source: A string. The source of the operation that is attempting to obtain changes from this repository (see section ). See the documentation + linkend="sec.hook.sources"/>). See the documentation for the source parameter to the outgoing hook, in section - , for possible values + , for possible values of this parameter. url: A URL. The location of the remote repository, if known. See section for more + linkend="sec.hook.url"/> for more information. See also: outgoing (section - ) + ) - + <literal role="hook">pretag</literal>&emdash;before tagging a changeset @@ -1834,15 +1834,15 @@ If the tag to be created is revision-controlled, the precommit and pretxncommit hooks (sections and ) will also be run. + linkend="sec.hook.commit"/> and ) will also be run. See also: tag (section - ) + ) - + <literal role="hook">pretxnchangegroup</literal>&emdash;before completing addition of remote changesets @@ -1889,26 +1889,26 @@ source: A string. The source of these changes. See section for details. + linkend="sec.hook.sources"/> for details. url: A URL. The location of the remote repository, if known. See section for more + linkend="sec.hook.url"/> for more information. See also: changegroup - (section ), ), incoming (section ), ), prechangegroup (section ) + linkend="sec.hook.prechangegroup"/>) - + <literal role="hook">pretxncommit</literal>&emdash;before completing commit of new changeset @@ -1951,11 +1951,11 @@ See also: precommit - (section ) + (section ) - + <literal role="hook">preupdate</literal>&emdash;before updating or merging working directory @@ -1983,11 +1983,11 @@ See also: update (section - ) + ) - + <literal role="hook">tag</literal>&emdash;after tagging a changeset @@ -2016,15 +2016,15 @@ If the created tag is revision-controlled, the commit hook (section ) is run before this hook. + linkend="sec.hook.commit"/>) is run before this hook. See also: pretag (section - ) + ) - + <literal role="hook">update</literal>&emdash;after updating or merging working directory @@ -2054,7 +2054,7 @@ See also: preupdate - (section ) + (section ) diff -r 3c5e1c03cc3e -r cfdb601a3c8b en/ch11-template.xml --- a/en/ch11-template.xml Thu Mar 12 15:47:15 2009 +0800 +++ b/en/ch11-template.xml Thu Mar 12 15:51:39 2009 +0800 @@ -1,6 +1,6 @@ - + Customising the output of Mercurial @@ -10,7 +10,7 @@ command, or to customise the entire appearance of the built-in web interface. - + Using precanned output styles Packaged with Mercurial are some output styles that you can @@ -106,7 +106,7 @@ escape sequence, telling Mercurial to print a newline at the end of each template item. If you omit this newline, Mercurial will run each piece of output together. See - section for more details + section for more details of escape sequences. A template that prints a fixed string of text all the time @@ -124,10 +124,10 @@ and text with the expansion of whatever is inside. To print a literal curly brace, you must escape it, as described in section . + linkend="sec.template.escape"/>. - + Common template keywords You can start writing simple templates immediately using the @@ -149,7 +149,7 @@ committed. This is not human-readable; you must pass it through a filter that will render it appropriately. See section for more information + linkend="sec.template.filter"/> for more information on filters. The date is expressed as a pair of numbers. The first number is a Unix UTC timestamp (seconds since January 1, 1970); the second is the offset of the committer's @@ -197,12 +197,12 @@ human-readable output, so we must treat it specially. This involves using a filter, about which more in section . + linkend="sec.template.filter"/>. &interaction.template.simple.datekeyword; - + Escape sequences Mercurial's templating engine recognises the most commonly @@ -244,7 +244,7 @@ it. - + Filtering keywords to change their results Some of the results of template expansion are not diff -r 3c5e1c03cc3e -r cfdb601a3c8b en/ch12-mq.xml --- a/en/ch12-mq.xml Thu Mar 12 15:47:15 2009 +0800 +++ b/en/ch12-mq.xml Thu Mar 12 15:51:39 2009 +0800 @@ -1,10 +1,10 @@ - + Managing change with Mercurial Queues - + The patch management problem Here is a common scenario: you need to install a software @@ -37,7 +37,7 @@ When you have few changes to maintain, it is easy to manage a single patch using the standard diff and patch programs (see section for a discussion of these + linkend="sec.mq.patch"/> for a discussion of these tools). Once the number of changes grows, it starts to make sense to maintain patches as discrete chunks of work, so that for example a single patch will contain @@ -61,7 +61,7 @@ simplifies the patch management problem. - + The prehistory of Mercurial Queues During the late 1990s, several Linux kernel developers @@ -76,7 +76,7 @@ successfully using these scripts to manage hundreds (sometimes thousands) of patches on top of the Linux kernel. - + A patchwork quilt In early 2003, Andreas Gruenbacher and Martin Quinson @@ -120,7 +120,7 @@ Subversion working copy. - + From patchwork quilt to Mercurial Queues In mid-2005, Chris Mason took the features of quilt and @@ -183,7 +183,7 @@ And so on. - + Understanding patches Because MQ doesn't hide its patch-oriented nature, it is @@ -241,12 +241,12 @@ represented by one deletion and one insertion. We will return to some of the more subtle aspects of patches - later (in section ), but you + later (in section ), but you should have enough information now to use MQ. - + Getting started with Mercurial Queues Because MQ is implemented as an extension, you must @@ -400,12 +400,12 @@ but the patch no longer has a corresponding changeset in the repository, and the working directory does not contain the changes made by the patch. Figure illustrates + linkend="fig.mq.stack"/> illustrates the difference between applied and tracked patches. - + XXX + fileref="images/mq-stack.png"/>XXX add textApplied and unapplied patches in the MQ patch stack @@ -440,7 +440,7 @@ role="hg-ext-mq-cmd-qpop-opt">-a option to qpop causes it to pop all applied patches. (For some more ways to push and pop many patches, - see section + see section below.) &interaction.mq.tutorial.qpush-a; @@ -501,7 +501,7 @@ - + More about patches MQ uses the GNU patch command to apply @@ -700,7 +700,7 @@ and no longer does because you've changed the underlying code that your patches are based on, Mercurial Queues can help; see section for details. + linkend="sec.mq.merge"/> for details. Unfortunately, there aren't any great techniques for dealing with rejected hunks. Most often, you'll need to view @@ -747,7 +747,7 @@ - + Getting the best performance out of MQ MQ is very efficient at handling a large number of patches. @@ -801,7 +801,7 @@ is zero, the second is one, and so on. - + Updating your patches when the underlying code changes @@ -945,7 +945,7 @@ hg email qbase:qtip (Don't know what patchbombing is? See - section .) + section .) Need to see all of the patches since foo.patch that have touched files in a @@ -987,7 +987,7 @@ that represents the patch after the pop/push will have a different identity than the changeset that represented the hash beforehand. See section for + linkend="sec.mqref.cmd.qpush"/> for information as to why this is. It's not a good idea to - + Managing patches in a repository Because MQ's - + Third party tools for working with patches Once you've been working with patches for a while, you'll @@ -1140,7 +1140,7 @@ invocation of filterdiff can generate a smaller patch that only touches files whose names match a particular glob pattern. See section for another + linkend="mq-collab.tips.interdiff"/> for another example. @@ -1177,7 +1177,7 @@ For this reason, it is very much worth investing a little time to learn how to use some of the third-party tools I - described in section , + described in section , particularly diffstat and filterdiff. The former will give you a quick idea of what changes your patch @@ -1226,7 +1226,7 @@ &interaction.mq.tarball.repush; - + Combining entire patches MQ provides a command, Once you have this hunk, you can concatenate it onto the end of your destination patch and continue with the remainder - of section . + of section . diff -r 3c5e1c03cc3e -r cfdb601a3c8b en/ch13-mq-collab.xml --- a/en/ch13-mq-collab.xml Thu Mar 12 15:47:15 2009 +0800 +++ b/en/ch13-mq-collab.xml Thu Mar 12 15:51:39 2009 +0800 @@ -1,6 +1,6 @@ - + Advanced uses of Mercurial Queues @@ -430,12 +430,12 @@ path separators. - + Viewing the history of a patch If you're developing a set of patches over a long time, it's a good idea to maintain them in a repository, as - discussed in section . If you do + discussed in section . If you do so, you'll quickly discover that using the hg diff command to look at the history of changes to @@ -506,7 +506,7 @@ The extdiff extension is useful for more than merely improving the presentation of MQ patches. To read more about it, go to section . + linkend="sec.hgext.extdiff"/>. diff -r 3c5e1c03cc3e -r cfdb601a3c8b en/ch14-hgext.xml --- a/en/ch14-hgext.xml Thu Mar 12 15:47:15 2009 +0800 +++ b/en/ch14-hgext.xml Thu Mar 12 15:51:39 2009 +0800 @@ -1,6 +1,6 @@ - + Adding functionality with extensions @@ -15,13 +15,13 @@ plugins). We've already discussed a few of these extensions in earlier chapters. - Section + Section covers the fetch extension; this combines pulling new changes and merging them with local changes into a single command, fetch. - In chapter , we covered + In chapter , we covered several extensions that are useful for hook-related functionality: acl adds access control lists; The Mercurial Queues patch management extension is so invaluable that it merits two chapters and an appendix all - to itself. Chapter covers the + to itself. Chapter covers the basics; chapter discusses advanced topics; - and appendix goes into detail on + linkend="chap.mq-collab"/> discusses advanced topics; + and appendix goes into detail on each command. @@ -45,13 +45,13 @@ machinery you'll need to know about if you want to write an extension of your own. - In section , + In section , we'll discuss the possibility of huge performance improvements using the inotify extension. - + Improve performance with the <literal role="hg-ext">inotify</literal> extension @@ -188,7 +188,7 @@ Make sure that you have the Mercurial Queues extension, mq, enabled. If you've never used MQ, read section to get started + linkend="sec.mq.start"/> to get started quickly. Go into the - + Flexible diff support with the <literal role="hg-ext">extdiff</literal> extension @@ -360,7 +360,7 @@ example of such scripting in action with the mq extension and the interdiff command, see section . + linkend="mq-collab.tips.interdiff"/>. Defining command aliases @@ -402,14 +402,14 @@ - + Cherrypicking changes with the <literal role="hg-ext">transplant</literal> extension Need to have a long chat with Brendan about this. - + Send changes via email with the <literal role="hg-ext">patchbomb</literal> extension @@ -504,7 +504,7 @@ use. The default behaviour is to send unified diffs - (see section for a + (see section for a description of the format), one per message. You can send a binary bundle instead with the