background preloader

Mercurial

Facebook Twitter

Git Client - SmartGit. Chapter 9. Finding and fixing mistakes. Chapter 9.

Chapter 9. Finding and fixing mistakes

Finding and fixing mistakes To err might be human, but to really handle the consequences well takes a top-notch revision control system. In this chapter, we'll discuss some of the techniques you can use when you find that a problem has crept into your project. Mercurial has some highly capable features that will help you to isolate the sources of problems, and to handle them appropriately. I have the occasional but persistent problem of typing rather more quickly than I can think, which sometimes results in me committing a changeset that is either incomplete or plain wrong. Rolling back a transaction In the section called “Safe operation”, I mentioned that Mercurial treats each modification of a repository as a transaction. Here's a mistake that I often find myself making: committing a change in which I've created a new file, but forgotten to hg add it. $ hg status M a $ echo b > b$ hg commit -m 'Add file b'

Mercurial: The Definitive Guide. Thank You, Larry McVoy. By Richard M.

Thank You, Larry McVoy

Stallman For the first time in my life, I want to thank Larry McVoy. He recently eliminated a major weakness of the free software community, by announcing the end of his campaign to entice free software projects to use and promote his nonfree software. Soon, Linux development will no longer use this program, and no longer spread the message that nonfree software is a good thing if it's convenient. My gratitude is limited, since it was McVoy that created the problem in the first place.

There are thousands of nonfree programs, and most merit no special attention, other than developing a free replacement. McVoy made the program available gratis to free software developers. The free software movement has said, “Think of ‘free speech,’ not ‘free beer’” since 1990. McVoy's great triumph was the adoption of this program for Linux development. Of course, the Linux developers had practical reasons for what they did. Mercurial Project. Hg4j - Pure Java API and Toolkit for Mercurial DVCS.

Tech Talk: Linus Torvalds on git. Styling Mercurial’s CLI / hg tip. Styling Mercurial’s CLI posted by Steve Losh on January 15, 2010 Mercurial has a great command line interface and many people use it without ever feeling the need for a GUI to manage their repositories.

Styling Mercurial’s CLI / hg tip

However, we can make it even better by taking advantage of Mercurial’s templating features. In this tip I’m going to post some of the templates I use and show you how to use them yourself. Check out hg help templating if you want more details on how the templating actually works. If you like what you see you can grab my templates by cloning their repository from BitBucket: hg clone NOTE: I’ve customized the colors of my Terminal, so the colors will look different for you. Short Log In a previous tip I described how to create an hg slog alias that can be very useful for counting changesets. To use this template you can edit your ~/.hgrc file to contain the following: [alias] slog = log --style=/full/path/to/map-cmdline.slog Nice Log [alias] nlog = log --style=/full/path/to/map-cmdline.nlog.

Mercurial and Darcs « The Fugue. I'm a long-time distributed revision control user and advocate.

Mercurial and Darcs « The Fugue

I think it's the only way to go, but this article isn't about convincing you of that. I'll just take it for granted. From almost the beginning, I have used darcs. I did try Tom's ahem Lame Arch, which I found to be completely unusable. Darcs hasn't been around as long as arch, but it is in roughly the same generation as other early systems like monotone and bazaar. But I did look forward, and sideways. When the third wave of distributed revision control came along, ushered in by the Great Linux/BitKeeper Fiasco, I took a cursory look at git. Not entirely satisfied with git, and not being able to use darcs (because of the dreaded exponential merge, and general slowness), I looked at Mercurial (Hg from now on). PruningDeadBranches. Other Languages: Zh There are three standard ways of managing branches that you no longer plan on working with.

PruningDeadBranches

Each approach has advantages and disadvantages and should be selected on what best fits how you work with your repository. 1. Closing branches Mercurial version 1.2 introduced the ability to close a branch. Hg up -C badbranch hg commit --close-branch -m 'close badbranch, this approach never worked' hg up -C default # switch back to "good" branch. 5.4. Workbench — TortoiseHg v2.0.0 documentation. The Workbench is the primary TortoiseHg application.

5.4. Workbench — TortoiseHg v2.0.0 documentation

It allows you to browse your local repositories, make commits, perform searches, synchronize with other repositories, and perform various maintenance tasks. Nearly every Mercurial feature is accessible from the Workbench. Workbench dialog. Workbench Main Widgets are: Revision History ViewA tabbed widget to view multiple repositories at once.