summary: L10N messages hide clean-ness of workdir from 'hg summary' stable
authorFUJIWARA Katsunori <foozy@lares.dti.ne.jp>
Wed, 20 Jan 2010 13:50:06 +0900
branchstable
changeset 10269 acf001ee5ef8
parent 10268 2fa95306d40c
child 10270 c2e27f7966a7
child 10274 04207f5e7344
summary: L10N messages hide clean-ness of workdir from 'hg summary' 'hg summary' recognizes workdir as clean by searching for 'clean' is in own output text. But 'clean' is one of I18N target texts, so 'hg summary --quiet' behaves incorrectly in non-English locale.
mercurial/commands.py
--- a/mercurial/commands.py	Wed Jan 20 16:48:20 2010 +0100
+++ b/mercurial/commands.py	Wed Jan 20 13:50:06 2010 +0900
@@ -2949,6 +2949,7 @@
             t.append(l % len(s))
 
     t = ', '.join(t)
+    cleanworkdir = False
 
     if len(parents) > 1:
         t += _(' (merge)')
@@ -2956,10 +2957,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())