mq patch message not shown in repoview

Johan Samyn avatarJohan 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 <johan.samyn@gmail.com>
# Date 1292673650 -3600

repowidget: add qrename to cmenus

diff --git a/tortoisehg/hgqt/qrename.py b/tortoisehg/hgqt/qrename.py
new file mode 100644
--- /dev/null
+++ b/tortoisehg/hgqt/qrename.py

Good (by hgtk):

# HG changeset patch
# User Johan Samyn <johan.samyn@gmail.com>
# Date 1284325953 -7200
# Node ID 5594ef0a3bb94e299ef0e515547f1332aa5356cd
# Parent 6ca3f43a2690d75ca1c77a7a1f5fac1b27d094ad
reporegistry: allow groups to be reordered

diff --git a/tortoisehg/hgqt/reporegistry.py b/tortoisehg/hgqt/reporegistry.py
--- a/tortoisehg/hgqt/reporegistry.py

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

    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.

    5ebd596d0ab3

  4. Log in to comment
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.