diff hgext/mq.py @ 8366:0bf0045000b5

some modernization cleanups, forward compatibility
author Dirkjan Ochtman <dirkjan@ochtman.nl>
date Wed, 13 May 2009 14:08:39 +0200
parents bbc74c05b8a4
children 9a398dd53bcc
line wrap: on
line diff
--- a/hgext/mq.py	Tue May 12 10:03:36 2009 -0400
+++ b/hgext/mq.py	Wed May 13 14:08:39 2009 +0200
@@ -741,7 +741,7 @@
                 elif user:
                     p.write("From: " + user + "\n\n")
 
-                if callable(msg):
+                if hasattr(msg, '__call__'):
                     msg = msg()
                 commitmsg = msg and msg or ("[mq]: %s" % patchfn)
                 n = repo.commit(commitfiles, commitmsg, user, date, match=match, force=True)