Skip to Content
Mercurial: The Definitive Guide
book

Mercurial: The Definitive Guide

by Bryan O'Sullivan
June 2009
Beginner to intermediate
284 pages
8h 14m
English
O'Reilly Media, Inc.
Content preview from Mercurial: The Definitive Guide

Appendix B. Mercurial Queues Reference

MQ Command Reference

For an overview of the commands provided by MQ, use the command hg help mq.

qapplied—Print Applied Patches

The qapplied command prints the current stack of applied patches. Patches are printed in oldest-to-newest order, so the last patch in the list is the top patch.

qcommit—Commit Changes in the Queue Repository

The qcommit command commits any outstanding changes in the .hg/patches repository. This command only works if the .hg/patches directory is a repository, i.e., you created the directory using hg qinit -c or ran hg init in the directory after running qinit.

This command is shorthand for hg commit --cwd .hg/patches.

qdelete—Delete a Patch from the Series File

The qdelete command removes the entry for a patch from the series file in the .hg/patches directory. It does not pop the patch if the patch is already applied. By default, it does not delete the patch file; use the -f option to do that.

Option:

  • -f: Delete the patch file.

qdiff—Print a Diff of the Topmost Applied Patch

The qdiff command prints a diff of the topmost applied patch. It is equivalent to hg diff -r-2:-1.

qfold—Move Applied Patches into Repository History

The hg qfinish command converts the specified applied patches into permanent changes by moving them out of MQ’s control so that they will be treated as normal repository history.

qfold—Merge (fold) Several Patches into One

The qfold command merges multiple patches into the topmost applied patch, so that the topmost ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Version Control with Subversion, 2nd Edition

Version Control with Subversion, 2nd Edition

C. Michael Pilato, Ben Collins-Sussman, Brian W. Fitzpatrick
HTTP/2 in Action

HTTP/2 in Action

Barry Pollard

Publisher Resources

ISBN: 9780596804756Errata Page