Distributed revision control with Mercurial

Distributed revision control with Mercurial

A developer's guide to Mercurial, an easy to use and excellently scalable revision control system.

Publication date: 31 Dec 2007

ISBN-10: n/a

ISBN-13: n/a

Paperback: n/a

Views: 10,825

Type: N/A

Publisher: n/a

License: Open Publication License

Post time: 13 Aug 2007 11:22:13

Distributed revision control with Mercurial

Distributed revision control with Mercurial A developer's guide to Mercurial, an easy to use and excellently scalable revision control system.
Tag(s): Software Engineering
Publication date: 31 Dec 2007
ISBN-10: n/a
ISBN-13: n/a
Paperback: n/a
Views: 10,825
Document Type: N/A
Publisher: n/a
License: Open Publication License
Post time: 13 Aug 2007 11:22:13
Summary/Excerpts of (and not a substitute for) the Open Publication License:
The Open Publication works may be reproduced and distributed in whole or in part, in any medium physical or electronic, provided that the terms of this license are adhered to, and that this license or an incorporation of it by reference (with any options elected by the author(s) and/or publisher) is displayed in the reproduction. 

Click here to read the full license.
Excerpts from the Introduction:

Revision control is the process of managing multiple versions of a piece of information. In its simplest form, this is something that many people do by hand: every time you modify a file, save it under a new name that contains a number, each one higher than the number of the preceding version.

Manually managing multiple versions of even a single file is an error-prone task, though, so software tools to help automate this process have long been available. The earliest automated revision control tools were intended to help a single user to manage revisions of a single file. Over the past few decades, the scope of revision control tools has expanded greatly; they now manage multiple files, and help multiple people to work together. The best modern revision control tools have no problem coping with thousands of people working together on projects that consist of hundreds of thousands of files.

Why use revision control?

A key question about the practicality of revision control at these two different scales ("lone hacker" and "huge team") is how its benefits compare to its costs. A revision control tool that's difficult to understand or use is going to impose a high cost.

A five-hundred-person project is likely to collapse under its own weight almost immediately without a revision control tool and process. In this case, the cost of using revision control might hardly seem worth considering, since without it, failure is almost guaranteed.

On the other hand, a one-person "quick hack" might seem like a poor place to use a revision control tool, because surely the cost of using one must be close to the overall cost of the project. Right?

Mercurial uniquely supports both of these scales of development. You can learn the basics in just a few minutes, and due to its low overhead, you can apply revision control to the smallest of projects with ease. Its simplicity means you won't have a lot of abstruse concepts or command sequences competing for mental space with whatever you're really trying to do. At the same time, Mercurial's high performance and peer-to-peer nature let you scale painlessly to handle large projects.

No revision control tool can rescue a poorly run project, but a good choice of tools can make a huge difference to the fluidity with which you can work on a project.

Why choose Mercurial?

Mercurial has a unique set of properties that make it a particularly good choice as a revision control system.

* It is easy to learn and use.
* It is lightweight.
* It scales excellently.
* It is easy to customise.

If you are at all familiar with revision control systems, you should be able to get up and running with Mercurial in less than five minutes. Even if not, it will take no more than a few minutes longer. Mercurial's command and feature sets are generally uniform and consistent, so you can keep track of a few general rules instead of a host of exceptions.

On a small project, you can start working with Mercurial in moments. Creating new changes and branches; transferring changes around (whether locally or over a network); and history and status operations are all fast. Mercurial attempts to stay nimble and largely out of your way by combining low cognitive overhead with blazingly fast operations.

The usefulness of Mercurial is not limited to small projects: it is used by projects with hundreds to thousands of contributors, each containing tens of thousands of files and hundreds of megabytes of source code.

If the core functionality of Mercurial is not enough for you, it's easy to build on. Mercurial is well suited to scripting tasks, and its clean internals and implementation in Python make it easy to add features in the form of extensions. There are a number of popular and useful extensions already available, ranging from helping to identify bugs to improving performance.
 




About The Author(s)


Bryan O'Sullivan is an Irish hacker and writer who likes distributed systems, open source software, and programming languages. He was a member of the initial design team for the Jini network service architecture (subsequently open sourced as Apache River). He has made significant contributions to, and written a book about, the popular Mercurial revision control system. He lives in San Francisco with his wife and sons. Whenever he can, he runs off to climb rocks.

Bryan O'Sullivan

Bryan O'Sullivan is an Irish hacker and writer who likes distributed systems, open source software, and programming languages. He was a member of the initial design team for the Jini network service architecture (subsequently open sourced as Apache River). He has made significant contributions to, and written a book about, the popular Mercurial revision control system. He lives in San Francisco with his wife and sons. Whenever he can, he runs off to climb rocks.


Book Categories
Sponsors
Icons8, a free icon pack