# HG changeset patch
# User Yuki KODAMA <endflow....@gmail.com>
# Date 1256735899 -32400
# Branch stable
# Node ID 97aca32d8052efee34b0430bbb5182201fcdb2aa
# Parent  a09cb9eeba90f22cbc5a7ff305e8fef5d7584688
csinfo: attempt to get commit message if patch.extract() returns nothing

diff --git a/tortoisehg/hgtk/csinfo.py b/tortoisehg/hgtk/csinfo.py
--- a/tortoisehg/hgtk/csinfo.py
+++ b/tortoisehg/hgtk/csinfo.py
@@ -148,10 +148,16 @@
                 os.unlink(tmpfile)
         finally:
             pf.close()
+        if not msg and hasattr(repo, 'mq'):
+            # attempt to get commit message
+            from hgext import mq
+            msg = mq.patchheader(repo.mq.join(self._patchname)).message
+            if msg:
+                msg = '\n'.join(msg)
         self._node = node
         self._user = user and hglib.toutf(user) or ''
         self._date = date and util.parsedate(date) or None
-        self._desc = msg and hglib.toutf(msg.rstrip('\r\n')) or ''
+        self._desc = msg and msg or ''
         self._branch = branch and hglib.toutf(branch) or ''
         self._parents = []
         for p in (p1, p2):

Attachment: thg-kuy_rev4807.patch
Description: Binary data

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Tortoisehg-develop mailing list
Tortoisehg-develop@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tortoisehg-develop

Reply via email to