comparison mercurial/commands.py @ 10269:acf001ee5ef8 stable

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.
author FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
date Wed, 20 Jan 2010 13:50:06 +0900
parents 25e572394f5c
children c2e27f7966a7 be324d31b6c5
comparison
equal deleted inserted replaced
10268:2fa95306d40c 10269:acf001ee5ef8
2947 for s,l in zip(st, labels): 2947 for s,l in zip(st, labels):
2948 if s: 2948 if s:
2949 t.append(l % len(s)) 2949 t.append(l % len(s))
2950 2950
2951 t = ', '.join(t) 2951 t = ', '.join(t)
2952 cleanworkdir = False
2952 2953
2953 if len(parents) > 1: 2954 if len(parents) > 1:
2954 t += _(' (merge)') 2955 t += _(' (merge)')
2955 elif branch != parents[0].branch(): 2956 elif branch != parents[0].branch():
2956 t += _(' (new branch)') 2957 t += _(' (new branch)')
2957 elif (not st[0] and not st[1] and not st[2]): 2958 elif (not st[0] and not st[1] and not st[2]):
2958 t += _(' (clean)') 2959 t += _(' (clean)')
2960 cleanworkdir = True
2959 elif pnode not in bheads: 2961 elif pnode not in bheads:
2960 t += _(' (new branch head)') 2962 t += _(' (new branch head)')
2961 2963
2962 if 'clean' in t: 2964 if cleanworkdir:
2963 ui.status(_('commit: %s\n') % t.strip()) 2965 ui.status(_('commit: %s\n') % t.strip())
2964 else: 2966 else:
2965 ui.write(_('commit: %s\n') % t.strip()) 2967 ui.write(_('commit: %s\n') % t.strip())
2966 2968
2967 # all ancestors of branch heads - all ancestors of parent = new csets 2969 # all ancestors of branch heads - all ancestors of parent = new csets