[PATCH] summary: L10N messages hide clean-ness of workdir from 'hg summary'

FUJIWARA Katsunori fujiwara at ascade.co.jp
Tue Jan 19 23:04:22 CST 2010


# HG changeset patch
# User FUJIWARA Katsunori <foozy at lares.dti.ne.jp>
# Date 1263963006 -32400
# Node ID 1b13b7171c6c1f0b28503b0f8bad1c5ddc1b66a3
# Parent  843f6ee6d14bf7ce2004cf3583ca67c75308f4bc
summary: L10N messages hide clean-ness of workdir from 'hg summary'

'hg summary' recognizes workdir as clean when 'clean' is in own output
text. But 'clean' is one of I18N target texts, so 'hg summary' with
--quiet option behaves incorrectly in non English locale.

diff -r 843f6ee6d14b -r 1b13b7171c6c mercurial/commands.py
--- a/mercurial/commands.py	Thu Jan 07 16:06:36 2010 +0100
+++ b/mercurial/commands.py	Wed Jan 20 13:50:06 2010 +0900
@@ -2944,6 +2944,7 @@
             t.append(l % len(s))
 
     t = ', '.join(t)
+    cleanworkdir = False
 
     if len(parents) > 1:
         t += _(' (merge)')
@@ -2951,10 +2952,11 @@
         t += _(' (new branch)')
     elif (not st[0] and not st[1] and not st[2]):
         t += _(' (clean)')
+        cleanworkdir = True
     elif pnode not in bheads:
         t += _(' (new branch head)')
 
-    if 'clean' in t:
+    if cleanworkdir:
         ui.status(_('commit: %s\n') % t.strip())
     else:
         ui.write(_('commit: %s\n') % t.strip())



More information about the Mercurial-devel mailing list