Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Documentation Links

ManPages in PDF format:­–

ManPages as pre-formatted text:­–

Recent Chamber Activity

2022-04-01

Recent Wiki Changes

2022-03-31

Wiki Guide

Side Bar

Mercurial Queues Emulation for Git

  • R/O
  • R/O (HTTP)
  • R/W (SSH)
  • R/W (HTTPS)
Fork

What is Git-MQ?

Git-MQ is a suite of shell scripts which extend the capabilities of git itself, to support patch queue management, by emulating (a subset) of the features offered by the Mercurial Queues Extension, to users of the Mercurial Source Code Management System. It exhibits a modular structure, to facilitate integration with other software suites; in particular — but by no means restricted to this purpose — it has been developed to support the package building feature of the mingw-pkg suite, which was originally developed around the use of Mercurial for source code and patch management, for the convenience of users who may prefer to use git, rather than Mercurial, for this purpose.

Why Use Git-MQ?

If you've read the Mercurial Queues reference information, you may be wondering "why would I want to use Git-MQ?" Well, in the first place, I don't agree with the suggestion that tools such as rebase, and histedit, (or their git equivalents), are necessarily a better choice than mq — it very much depends on your ultimate objective, and mq is, by far, the better choice when the creation and management of patches is high on your priority list, (as it was for me). Secondly, the caveat about losing data is every bit as applicable to any method of rewriting history, as it may be to mq — in fact, in many years of using Mercurial Queues, I have never suffered any consequential data loss!

So, if you are comfortable with rebasing, and rewriting history, by all means continue to use those techniques. However, if management of patches is of interest to you, (e.g. as a constituent of a ports system), you may wish to consider Git-MQ; if nothing else, it offers a clean, consistent, user interface for the management of a patch series, within git.

Git-MQ Licensing

Git-MQ Version 1.0, written by Keith Marshall
Copyright (C) 2018, 2019, 2022, Keith Marshall

The Git-MQ program suite is free software: you can redistribute it
and/or modify it under the terms of the GNU General Public Licence
as published by the Free Software Foundation, either version 3 of
the Licence, or (at your option) any later version.

The Git-MQ program suite is distributed in the hope that it will be
useful, but WITHOUT ANY WARRANTY; without even the implied warranty
of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public Licence for more details.

You should have received a copy of the GNU General Public Licence
along with this program.  If not, see <https://www.gnu.org/licenses/>.

Git-MQ Features

Git-MQ is designed as an extension for git itself, providing to git users, a suite of commands which closely mimic those provided to Mercurial users, by Mercurial's mq extension. Thus, where a Mercurial user might invoke the "hg qnew ..." command, a Git-MQ user would invoke the "git qnew ..." command.

In its present state of development, a substantially complete subset of Mercurial's mq commands are emulated in Git-MQ; those which are currently supported comprise:–

git qnew create a new patch, add it to the Git-MQ patch series, and push it on to the Git-MQ applied patch stack
git qimport import, and optionally apply, third party patches into the Git-MQ patch series, or bring existing non-patch commits under Git-MQ
control, as applied patches
git qrefresh update the topmost applied Git-MQ patch, to include local changes, and/or amend patch header meta-data
git qfold combine Git-MQ patches, by merging content from known, but unapplied, patches into the topmost applied patch
git qpush push the next available unapplied patch(es), from the Git-MQ patch series, on to the applied patch stack
git qpop pop the topmost applied Git-MQ patch(es) from the stack, and return it/them to the head of the unapplied patch series
git qgoto push or pop Git-MQ patches, until a specified patch becomes topmost on the applied patch stack
git qfinish move applied patches out of Git-MQ control, and into permanent project history
git qrename
git qmv
rename patches within a Git-MQ patch series; "git qrename" and "git qmv" are aliases, exhibiting identical functionality
git qdelete
git qremove
git qrm
remove unwanted patches from a Git-MQ patch series; "git qdelete", "git qremove", and "git qrm" are aliases; all exhibit identical functionality
git qguard assign guards to, or remove guards from, individual Git-MQ patches, or list all guard assignments
git qselect activate, deactivate, or display the Git-MQ guards, which select a particular subset of patches which may be applied
git qseries list the entire series of known Git-MQ patches, (both applied and unapplied), which is available in the working repository
git qapplied list the series of Git-MQ patches which have been applied, in the working repository
git qunapplied list the series of Git-MQ patches which are available, but not yet applied, in the working repository
git qtop identify the topmost patch on the Git-MQ applied patch stack
git qprev identify the applied patch immediately below the topmost, on the Git-MQ applied patch stack
git qnext identify the next available unapplied patch, in the Git-MQ series, which may be pushed on to the applied patch stack
git qheader display the header (commit message) content from the topmost applied patch, or any specified patch, in the Git-MQ patch series
git qdiff display the aggregate change-set attributable to the topmost applied Git-MQ patch, as modified by any uncommitted changes

Installing Git-MQ

Git-MQ may be conveniently installed by selecting the git-mq-<version>-bin.tar.xz package, from the following list of released files, downloading, and unpacking it into your choice of installation <prefix> directory:

FilenameSizeTimeDownload count
git-mq-1.0-bin.tar.xz62.19 k2022-04-01 06:16:1132
git-mq-1.0-bin.tar.xz.sig5872022-04-01 06:15:1530
git-mq-1.0-src.tar.xz95.11 k2022-04-01 06:14:1037
git-mq-1.0-src.tar.xz.sig5872022-04-01 06:13:3025
git-mq-1.0-pdf.tar.xz335.93 k2022-04-01 06:11:2636
git-mq-1.0-pdf.tar.xz.sig5872022-04-01 06:10:2929

Once installed, and provided git is already installed, and <prefix>/bin is in $PATH, you may run any of the Git-MQ subcommands listed in the table, under Git-MQ Features, as if it were any regular git command; access to the documentation, (which requires a man-page reader), is provided by appending the --help option, or by running git help with the subcommand name as argument.

Alternatively, if you prefer to build, and install from source, you may download the git-mq-<version>-src.tar.xz package, unpack it into any working directory of your choice, then proceed as follows:

$ mkdir git-mq-<version>/build
$ cd git-mq-<version>/build
$ ../configure --prefix=<your-choice>
$ make
$ make install

Note that you may omit the --prefix=<your-choice> argument to configure; in this case, configure will choose /usr/local on your behalf, and you will likely need to run the make install step as a privileged user. (You may also need to do this, if --prefix=<your-choice> refers to a directory requiring privileged access rights).

Recent Commits

Rev.TimeAuthorMessage RSS
1a53f0d92022-03-31 22:05:16Keith MarshallPromote git-mq-1.0-rc-3 to final release status, * confi...
1338d40a2022-02-25 23:55:21Keith MarshallCorrect copyright assignment errors. * mq-atexit.sh mq-m...
b32193052022-02-24 20:19:29Keith MarshallPublish 3rd v1.0 release candidate. * configure.ac (AC_I...
56fe1e902022-02-24 19:34:25Keith MarshallAdd mercurial support for ChangeLog generation. * Makefi...
f57c62a22022-02-24 06:26:22Keith MarshallGenerate ChangeLog to include in source distribution. * ...
0f1512b22022-02-23 01:43:02Keith MarshallRobustly interpret "--color" and "--colour" as aliases. ...
1da2daa32022-02-20 00:33:48Keith MarshallEnsure "git qfold" runs with the correct CWD. * git-qfol...
880e59902022-02-13 02:32:33Keith MarshallInstall aliases for "git qdelete" and "git qrename". * M...
f7dc1b982022-02-12 03:11:54Keith MarshallUpdate commit timestamp on "git qrefresh" or "git qfold"....
b0667eb92022-02-11 18:45:12Keith MarshallEnsure "git qimport -P" runs with the correct CWD. * git...

Most Recently Updated Unresolved Tickets

To see resolved tickets, in addition to unresolved, click the "More" button below, (if visible), or the "Ticket" button above, then the "Filter" button at top right, select "Show" mode for closed tickets, and "Submit" the amended view request.

No tickets