[PATCH] mq: qfinish -a should check for translated default commit messages and abort

David Soria Parra sn_ at gmx.net
Wed Jan 20 06:57:16 CST 2010


# HG changeset patch
# User David Soria Parra <dsp at php.net>
# Date 1263992171 -3600
# Node ID b56775616552a93d7832104d24794ee9fe3c25a1
# Parent  a9c0d6060827edf92106ed00430e96d524fc2d8d
mq: qfinish -a should check for translated default commit messages and abort.

Currently mq qfinish -a only checks for the english version of "imported patch"
to detect if a patch has an empty commit message. We have to use the i18n
version of it. As the i18n version is newline terminated, we have to strip the
newline after the translation to ensure the match works.

diff --git a/hgext/mq.py b/hgext/mq.py
--- a/hgext/mq.py
+++ b/hgext/mq.py
@@ -727,7 +727,7 @@
                 raise util.Abort(msg % rev)
 
             patch = self.applied[i].name
-            for fmt in ('[mq]: %s', 'imported patch %s'):
+            for fmt in ('[mq]: %s', _("imported patch %s\n").strip()):
                 if ctx.description() == fmt % patch:
                     msg = _('patch %s finalized without changeset message\n')
                     repo.ui.status(msg % patch)


More information about the Mercurial-devel mailing list