Mq extension qfinish commit message
Peter Williams
pwil3058 at bigpond.net.au
Fri Aug 14 04:01:37 UTC 2009
On 14/08/09 12:27, Stuart W. Marks wrote:
>> 2009/8/14 Ian Lewis<ianmlewis at gmail.com>:
>>> 2009/8/14 Mads Kiilerich<mads at kiilerich.com>:
>>>> Ian Lewis wrote, On 08/14/2009 02:42 AM:
>>>>> Hey all,
>>>>>
>>>>> I'm trying to start to use the mq extension for regular work and
>>>>> wanted to know how to commit patches from mq with a commit message. Is
>>>>> there a good way to this?
>>>>>
>>>>> I usually run hg qfinish<patch_name> or hg qfinish qbase:qtip when I
>>>>> want to commit a patch but it commits it with a commit message like
>>>>> [mq]<patch name> automatically.
>>>>>
>>>>> Any pointers would be appreciated.
>>>>>
>>>> "hg qrefresh -e" before qfinishing?
>>>>
>>>> /Mads
>>>>
>>>> ps: The fact that the answer wasn't obvious should be considered by
>>>> those who are considering how mq UI can be improved.
>>>>
>>> That's probably what I was looking for. Interesing that it's on the qrefresh.
>
> The -e, -m, and -l options, which set the commit message in different ways, are
> on qnew as well as on qrefresh. I think the expectation is that you set the
> commit message using qnew before you start working on a new patch. I agree,
> though, this is somewhat at odds with "normal" Mercurial, where you set the
> message at commit time, after you've made the changes.
You can also edit the patch file BUT any changes you do there won't show
up in the qfinished change set unless you do a qrefresh first. This is
a trap for young players. I think it's because qfinish doesn't really
do a commit as an applied patch is already committed (sort of) so
qfinish just changes mq's view of the change set in which the patch
resides (from being a patch to just an ordinary change set).
It would be nice if qfinish compared the description in the patch file
with the commit message in the change set (that it's about to promote)
and aborted if they're different (with a -f flag to force the change if
it's really what you want to do). The same sort of thing could also be
done for empty descriptions.
Peter
--
Peter Williams pwil3058 at bigpond.net.au
"Learning, n. The kind of ignorance distinguishing the studious."
-- Ambrose Bierce
More information about the Mercurial
mailing list