3

I use mercurial queues and sometimes I forget to set my message with a hg qrefresh -m ... and forget to check before I run hg qfinish and I get the message patch MyPatch finalized without changeset message. Is there any way I can make qfinish abort if there is no message?

The only way I found to fix this after I do that is to generate a patch, hg strip my last revision, reapply the patch and then commit with my message.

Asa Ayers
  • 4,854
  • 6
  • 40
  • 57

2 Answers2

6

Use hg qimport -r tip to turn the last changeset (your finalized patch) in to a MQ patch again.

Martin Geisler
  • 72,968
  • 25
  • 171
  • 229
  • Much better idea than mine :) – anton.burger Sep 03 '10 at 21:36
  • I just used this command and its great. It solves my primary problem that lead to this question. – Asa Ayers Sep 04 '10 at 05:38
  • 1
    Asa: I'm glad you like it... though we should probably be smarter and let `hg qfinish` prompt you for a commit message in the same way that `hg commit` does if no message has been supplied already. See also http://mercurial.selenic.com/bts/issue2021 – Martin Geisler Sep 05 '10 at 08:21
0

One way around this problem is to add -e to the default options for qrefresh and qnew, in your ~/.hgrc:

[defaults]
qrefresh = -e
qnew = -e

This way you can no longer forget to describe the patch.

umonkey
  • 106
  • 1
  • 3