# HG changeset patch # User Bryan O'Sullivan # Date 1240558041 25200 # Node ID a66f6d499afa28ff81fc07f37e0260302b803625 # Parent 1a0a78e197c3ef91f2b8dbada59421d2ef729bd5 Add paragraph IDs diff -r 1a0a78e197c3 -r a66f6d499afa en/ch04-daily.xml --- a/en/ch04-daily.xml Fri Apr 24 00:27:05 2009 -0700 +++ b/en/ch04-daily.xml Fri Apr 24 00:27:21 2009 -0700 @@ -677,17 +677,17 @@ More useful diffs - The default output of the hg + The default output of the hg diff command is backwards compatible with the regular diff command, but this has some drawbacks. - Consider the case where we use hg + Consider the case where we use hg rename to rename a file. &interaction.ch04-diff.rename.basic; - The output of hg diff above + The output of hg diff above obscures the fact that we simply renamed a file. The hg diff command accepts an option, or , to use a newer @@ -696,7 +696,7 @@ &interaction.ch04-diff.rename.git; - This option also helps with a case that can otherwise be + This option also helps with a case that can otherwise be confusing: a file that appears to be modified according to hg status, but for which hg diff prints nothing. This @@ -705,7 +705,7 @@ &interaction.ch04-diff.chmod; - The normal diff command pays no attention + The normal diff command pays no attention to file permissions, which is why hg diff prints nothing by default. If we supply it with the option, it tells us what really @@ -717,28 +717,28 @@ Which files to manage, and which to avoid - Revision control systems are generally best at managing text + Revision control systems are generally best at managing text files that are written by humans, such as source code, where the files do not change much from one revision to the next. Some centralized revision control systems can also deal tolerably well with binary files, such as bitmap images. - For instance, a game development team will typically manage + For instance, a game development team will typically manage both its source code and all of its binary assets (e.g. geometry data, textures, map layouts) in a revision control system. - Because it is usually impossible to merge two conflicting + Because it is usually impossible to merge two conflicting modifications to a binary file, centralized systems often provide a file locking mechanism that allow a user to say I am the only person who can edit this file. - Compared to a centralized system, a distributed revision + Compared to a centralized system, a distributed revision control system changes some of the factors that guide decisions over which files to manage and how. - For instance, a distributed revision control system cannot, + For instance, a distributed revision control system cannot, by its nature, offer a file locking facility. There is thus no built-in mechanism to prevent two people from making conflicting changes to a binary file. If you have a team where several @@ -746,7 +746,7 @@ good idea to use Mercurial&emdash;or any other distributed revision control system&emdash;to manage those files. - When storing modifications to a file, Mercurial usually + When storing modifications to a file, Mercurial usually saves only the differences between the previous and current versions of the file. For most text files, this is extremely efficient. However, some files (particularly binary files) are @@ -759,7 +759,7 @@ affect both local storage needs and the amount of time it takes to clone a repository. - To get an idea of how this could affect you in practice, + To get an idea of how this could affect you in practice, suppose you want to use Mercurial to manage an OpenOffice document. OpenOffice stores documents on disk as compressed zip files. Edit even a single letter of your document in OpenOffice, @@ -772,22 +772,22 @@ to Mercurial's storage assumptions can easily have an outsized effect on the size of the repository. - Even worse, if both you and someone else edit the OpenOffice + Even worse, if both you and someone else edit the OpenOffice document you're working on, there is no useful way to merge your work. In fact, there isn't even a good way to tell what the differences are between your respective changes. - There are thus a few clear recommendations about specific + There are thus a few clear recommendations about specific kinds of files to be very careful with. - Files that are very large and incompressible, e.g. ISO + Files that are very large and incompressible, e.g. ISO CD-ROM images, will by virtue of sheer size make clones over a network very slow. - Files that change a lot from one revision to the next + Files that change a lot from one revision to the next may be expensive to store if you edit them frequently, and conflicts due to concurrent edits may be difficult to resolve. @@ -798,7 +798,7 @@ Backups and mirroring - Since Mercurial maintains a complete copy of history in each + Since Mercurial maintains a complete copy of history in each clone, everyone who uses Mercurial to collaborate on a project can potentially act as a source of backups in the event of a catastrophe. If a central repository becomes unavailable, you @@ -806,7 +806,7 @@ repository from one contributor, and pulling any changes they may not have seen from others. - It is simple to use Mercurial to perform off-site backups + It is simple to use Mercurial to perform off-site backups and remote mirrors. Set up a periodic job (e.g. via the cron command) on a remote server to pull changes from your master repositories every hour. This will @@ -815,7 +815,7 @@ you'll need to do a little scripting to refresh the list of repositories to back up. - If you perform traditional backups of your master + If you perform traditional backups of your master repositories to tape or disk, and you want to back up a repository named myrepo. Use hg clone -U myrepo myrepo.bak to create a @@ -824,7 +824,7 @@ working directory after the clone completes, since that would be superfluous and make the backup take longer. - If you then back up myrepo.bak instead + If you then back up myrepo.bak instead of myrepo, you will be guaranteed to have a consistent snapshot of your repository that won't be pushed to by an insomniac developer in mid-backup. diff -r 1a0a78e197c3 -r a66f6d499afa en/ch11-mq.xml --- a/en/ch11-mq.xml Fri Apr 24 00:27:05 2009 -0700 +++ b/en/ch11-mq.xml Fri Apr 24 00:27:21 2009 -0700 @@ -748,13 +748,13 @@ More on patch management - As you grow familiar with MQ, you will find yourself wanting + As you grow familiar with MQ, you will find yourself wanting to perform other kinds of patch management operations. Deleting unwanted patches - If you want to get rid of a patch, use the If you want to get rid of a patch, use the hg qdelete command to delete the patch file and remove its entry from the patch series. If you try to delete a patch that is still applied, Converting to and from permanent revisions - Once you're done working on a patch and want to turn it + Once you're done working on a patch and want to turn it into a permanent changeset, use the hg qdelete -r command. Pass a revision to the option to identify the @@ -775,13 +775,13 @@ &interaction.ch11-qdelete.convert; - It is also possible to turn an existing changeset into a + It is also possible to turn an existing changeset into a patch, by passing the option to hg qimport. &interaction.ch11-qdelete.import; - Note that it only makes sense to convert a changeset into + Note that it only makes sense to convert a changeset into a patch if you have not propagated that changeset into any other repositories. The imported changeset's ID will change every time you refresh the patch, which will make Mercurial