mq patch message not shown in repoview

Issue #43 resolved
Johan Samyn
created an issue

When I create a new MQ patch from the commit tab, with a message for it, then that message is only shown in the changelog when applied. Nor is it shown in the changeset info in the revdetails tab. Cause seems to be that in the patchfile there is a blanc line between the last headerlines and the message.

Bad (by thg): {{{

HG changeset patch

Parent fb026f47443e45efaf6d7eab6d61bda759508375

User Johan Samyn

Date 1292673650 -3600

repowidget: add qrename to cmenus

diff --git a/tortoisehg/hgqt/ b/tortoisehg/hgqt/ new file mode 100644 --- /dev/null +++ b/tortoisehg/hgqt/ }}}

Good (by hgtk): {{{

HG changeset patch

User Johan Samyn

Date 1284325953 -7200

Node ID 5594ef0a3bb94e299ef0e515547f1332aa5356cd

Parent 6ca3f43a2690d75ca1c77a7a1f5fac1b27d094ad

reporegistry: allow groups to be reordered

diff --git a/tortoisehg/hgqt/ b/tortoisehg/hgqt/ --- a/tortoisehg/hgqt/ }}}

Also see the screenshot.

Comments (4)

  1. Steve Borho

    I couldn't reproduce this on Windows either, except by including a leading blank line in the initial qnew message. I've pushed a62433a33328 to strip the patch message when doing a qnew. Can you still reproduce the problem?

  2. Johan Samyn reporter

    That patch does not solve the problem.

    I also noticed that when importing a cset into MQ, things are ok. But then there is a # Node ... line in the header. That line is missing when creating a patch via qnew. It's not added when doing qrefresh neither. Perhaps that is the cause of the blank line?

  3. Steve Borho

    The lack of a node line is normal for QNew vs QImport. The node line holds the changeset hash of the revision that was imported.

    Once the blank line exists between the header and message, qref is unable to fix it. The refresh code preserves the blank line.

    So you're still able to create new patches with the blank line? I wasn't able to.

    But anyway, it's a simple problem. We only show the first line of the changeset summary, and in this case the first line is empty. I looked at how 'hg import' itself works and it strips the message read from the file, so I did that in our patch context as well.


  4. Log in to comment