Book description
This instructive book takes you step by step through ways to track, merge, and manage both open source and commercial software projects with Mercurial, using Windows, Mac OS X, Linux, Solaris, and other systems. Mercurial is the easiest system to learn when it comes to distributed revision control. And it's a very flexible tool that's ideal whether you're a lone programmer working on a small project, or part of a huge team dealing with thousands of files.
Mercurial permits a countless variety of development and collaboration methods, and this book offers several concrete suggestions to get you started. This guide will help you:
- Learn the basics of working with a repository, changesets, and revisions
- Merge changes from separate repositories
- Set up Mercurial to work with files on a daily basis, including which ones to track
- Get examples and tools for setting up various workflow models
- Manage a project that's making progress on multiple fronts at once
- Find and fix mistakes by isolating problem sources
- Use hooks to perform actions automatically in response to repository events
- Customize the output of Mercurial
Mercurial: The Definitive Guide maintains a strong focus on simplicity to help you learn Mercurial quickly and thoroughly.
Publisher resources
Table of contents
-
Mercurial: The Definitive Guide
- SPECIAL OFFER: Upgrade this ebook with O’Reilly
- Preface
-
1. A Brief History of Revision Control
- Why Revision Control? Why Mercurial?
- This Book Is a Work in Progress
- About the Examples in This Book
- Trends in the Field
- A Few Advantages of Distributed Revision Control
- Why Choose Mercurial?
- Mercurial Compared with Other Tools
- Switching from Another Tool to Mercurial
- A Short History of Revision Control
- 2. A Tour of Mercurial: The Basics
- 3. A Tour of Mercurial: Merging Work
- 4. Behind the Scenes
- 5. Mercurial in Daily Use
-
6. Collaborating with Other People
- Mercurial’s Web Interface
- Collaboration Models
- The Technical Side of Sharing
- Informal Sharing with hg serve
- Using the Secure Shell Protocol
- Serving Over HTTP Using CGI
- System-Wide Configuration
- 7. Filenames and Pattern Matching
-
8. Managing Releases and Branchy Development
- Giving a Persistent Name to a Revision
- The Flow of Changes: Big Picture Versus Little Picture
- Managing Big-Picture Branches in Repositories
- Don’t Repeat Yourself: Merging Across Branches
- Naming Branches Within One Repository
- Dealing with Multiple Named Branches in a Repository
- Branch Names and Merging
- Branch Naming Is Generally Useful
- 9. Finding and Fixing Mistakes
-
10. Handling Repository Events with Hooks
- An Overview of Hooks in Mercurial
- Hooks and Security
- A Short Tutorial on Using Hooks
- Writing Your Own Hooks
- Some Hook Examples
- Bundled Hooks
- Information for Writers of Hooks
-
Hook Reference
- changegroup—After Remote Changesets Added
- commit—After a New Changeset Is Created
- incoming—After One Remote Changeset Is Added
- outgoing—After Changesets Are Propagated
- prechangegroup—Before Starting to Add Remote Changesets
- precommit—Before Starting to Commit a Changeset
- preoutgoing—Before Starting to Propagate Changesets
- pretag—Before Tagging a Changeset
- pretxnchangegroup—Before Completing Addition of Remote Changesets
- pretxncommit—Before Completing Commit of New Changeset
- preupdate—Before Updating or Merging Working Directory
- tag—After Tagging a Changeset
- update—After Updating or Merging Working Directory
- 11. Customizing the Output of Mercurial
-
12. Managing Changes with Mercurial Queues
- The Patch Management Problem
- The Prehistory of Mercurial Queues
- The Huge Advantage of MQ
- Understanding Patches
- Getting Started with Mercurial Queues
- More About Patches
- More on Patch Management
- Getting the Best Performance Out of MQ
- Updating Your Patches When the Underlying Code Changes
- Identifying Patches
- Useful Things to Know About
- Managing Patches in a Repository
- Third-Party Tools for Working with Patches
- Good Ways to Work with Patches
- MQ Cookbook
- Differences Between Quilt and MQ
- 13. Advanced Uses of Mercurial Queues
- 14. Adding Functionality with Extensions
- A. Migrating to Mercurial
-
B. Mercurial Queues Reference
-
MQ Command Reference
- qapplied—Print Applied Patches
- qcommit—Commit Changes in the Queue Repository
- qdelete—Delete a Patch from the Series File
- qdiff—Print a Diff of the Topmost Applied Patch
- qfold—Move Applied Patches into Repository History
- qfold—Merge (fold) Several Patches into One
- qheader—Display the Header/Description of a Patch
- qimport—Import a Third-Party Patch into the Queue
- qinit—Prepare a Repository to Work with MQ
- qnew—Create a New Patch
- qnext—Print the Name of the Next Patch
- qpop—Pop Patches Off the Stack
- qprev—Print the Name of the Previous Patch
- qpush—Push Patches onto the Stack
- qrefresh—Update the Topmost Applied Patch
- qrename—Rename a Patch
- qseries—Print the Entire Patch Series
- qtop—Print the Name of the Current Patch
- qunapplied—Print Patches Not yet Applied
- hg strip—Remove a Revision and Descendants
- MQ File Reference
-
MQ Command Reference
- C. Installing Mercurial from Source
- D. Open Publication License
- Index
- About the Author
- Colophon
- SPECIAL OFFER: Upgrade this ebook with O’Reilly
Product information
- Title: Mercurial: The Definitive Guide
- Author(s):
- Release date: June 2009
- Publisher(s): O'Reilly Media, Inc.
- ISBN: 9780596555474
You might also like
book
Perl Best Practices
Many programmers code by instinct, relying on convenient habits or a "style" they picked up early …
article
Create Effective Documentation
This selection of shortcuts will enable you to improve your communication, critical thinking, documentation, and networking …
article
Use Github Copilot for Prompt Engineering
Using GitHub Copilot can feel like magic. The tool automatically fills out entire blocks of code--but …
book
Test-Driven Python Development
Develop high-quality and maintainable Python applications using the principles of test-driven development In Detail This book …