标签
No Tags

Frequently used words (click to add to your profile)

javaandroidc++linuxc#objective-ccocoa誰得qtrubypythonbathyscaphephpgamewindowsguic翻訳omegattwitterframeworktestbtronarduinovb.net計画中(planning stage)directxpreviewerゲームエンジンdom

Documentation Links

ManPages in PDF format:­–

ManPages as pre-formatted text:­–

Recent Chamber Activity

2020-01-08

Recent Wiki Changes

2020-01-06
2019-06-23
2019-06-22

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 0.1.0, written by Keith Marshall
Copyright (C) 2018, 2019, 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 rename patches within a Git-MQ patch series
git qdelete remove unwanted patches from a Git-MQ patch series
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:

Filename大小时间下载总数
git-mq-1.0-rc-2-bin.tar.gz76.38 k2020-01-08 02:54:513
git-mq-1.0-rc-2-bin.tar.gz.sig5872020-01-08 02:54:422
git-mq-1.0-rc-2-pdf.tar.xz325.04 k2020-01-08 02:48:232
git-mq-1.0-rc-2-pdf.tar.xz.sig5872020-01-08 02:48:132
git-mq-1.0-rc-2-src.tar.xz88.25 k2020-01-08 02:25:342
git-mq-1.0-rc-2-src.tar.xz.sig5872020-01-08 02:25:122

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.时间作者Message RSS
74ca11572020-01-08 00:22:55Keith MarshallPublish 2nd v1.0 release candidate. * configure.ac (AC_I...
078d06b12020-01-07 07:20:58Keith MarshallAvoid duplicate option definitions in git-rev-parse. * g...
41ff07402020-01-07 07:19:19Keith MarshallForget, and subsequently ignore .hgtags file. * .gitigno...
06d333492020-01-07 07:08:55Keith MarshallIgnore possible existence of ChangeLog file. * .gitignor...
9bd005372019-06-30 23:26:31Keith MarshallTag published release. * All files (v1.0-rc-1): Tag assi...
34ed6fe52019-06-30 23:23:49Keith MarshallPublish 1st v1.0 release candidate. * configure.ac (AC_I...
deec79c32019-06-29 01:53:26Keith MarshallPropagate version updates to deliverable scripts. * Make...
a374e7792019-06-29 01:32:12Keith MarshallAdd build system clean-up support. * Makefile.in (clean,...
2f65a8732019-06-29 00:55:48Keith MarshallDefine "install-strip" and "uninstall" rules. * Makefile...
f30505e52019-06-28 14:23:24Keith MarshallRevert unintentional version change. * configure.ac (AC_...

Latest updated Tickets

标题优先里程碑标签创建于最后更新
All Git-MQ commands fail, following git upgrade中等version 1.02020-01-06 23:30:012020-01-06 23:49:19
提交