bos@559: bos@26: dongsheng@625: bos@559: Preface bos@26: bos@559: Distributed revision control is a relatively new territory, bos@559: and has thus far grown due to people's willingness to strike out bos@559: into ill-charted territory. bos@26: bos@559: I am writing a book about distributed revision control because bos@559: I believe that it is an important subject that deserves a field bos@559: guide. I chose to write about Mercurial because it is the easiest bos@559: tool to learn the terrain with, and yet it scales to the demands bos@559: of real, challenging environments where many other revision bos@559: control tools fail. bos@26: bos@559: bos@559: This book is a work in progress bos@26: bos@559: I am releasing this book while I am still writing it, in the bos@559: hope that it will prove useful to others. I also hope that bos@559: readers will contribute as they see fit. bos@200: bos@559: bos@559: bos@559: About the examples in this book bos@200: bos@559: This book takes an unusual approach to code samples. Every bos@559: example is live---each one is actually the result bos@559: of a shell script that executes the Mercurial commands you see. bos@559: Every time an image of the book is built from its sources, all bos@559: the example scripts are automatically run, and their current bos@559: results compared against their expected results. bos@200: bos@559: The advantage of this approach is that the examples are bos@559: always accurate; they describe exactly the bos@559: behaviour of the version of Mercurial that's mentioned at the bos@559: front of the book. If I update the version of Mercurial that bos@559: I'm documenting, and the output of some command changes, the bos@559: build fails. bos@200: bos@559: There is a small disadvantage to this approach, which is bos@559: that the dates and times you'll see in examples tend to be bos@559: squashed together in a way that they wouldn't be bos@559: if the same commands were being typed by a human. Where a human bos@559: can issue no more than one command every few seconds, with any bos@559: resulting timestamps correspondingly spread out, my automated bos@559: example scripts run many commands in one second. bos@200: bos@559: As an instance of this, several consecutive commits in an bos@559: example can show up as having occurred during the same second. bos@559: You can see this occur in the bisect example in section , for instance. bos@200: bos@559: So when you're reading examples, don't place too much weight bos@559: on the dates or times you see in the output of commands. But bos@559: do be confident that the behaviour you're bos@559: seeing is consistent and reproducible. bos@26: bos@559: bos@559: bos@559: Colophon---this book is Free bos@26: bos@559: This book is licensed under the Open Publication License, bos@559: and is produced entirely using Free Software tools. It is bos@559: typeset with \LaTeX{}; illustrations are drawn and rendered with bos@559: Inkscape. bos@26: bos@559: The complete source code for this book is published as a bos@559: Mercurial repository, at http://hg.serpentine.com/mercurial/book. bos@559: bos@559: bos@559: bos@559: