comparison mercurial/commands.py @ 11091:3ec4c5442910

Merge with main
author Brendan Cully <brendan@kublai.com>
date Mon, 03 May 2010 15:28:04 -0700
parents 70a0acfe51d6 c4347e48b0d0
children 9fa028431957
comparison
equal deleted inserted replaced
11090:70a0acfe51d6 11091:3ec4c5442910
3107 ui.write(m, label='log.branch') 3107 ui.write(m, label='log.branch')
3108 else: 3108 else:
3109 ui.status(m, label='log.branch') 3109 ui.status(m, label='log.branch')
3110 3110
3111 st = list(repo.status(unknown=True))[:6] 3111 st = list(repo.status(unknown=True))[:6]
3112
3112 ms = mergemod.mergestate(repo) 3113 ms = mergemod.mergestate(repo)
3113 st.append([f for f in ms if ms[f] == 'u']) 3114 st.append([f for f in ms if ms[f] == 'u'])
3115
3116 subs = [s for s in ctx.substate if ctx.sub(s).dirty()]
3117 st.append(subs)
3118
3114 labels = [ui.label(_('%d modified'), 'status.modified'), 3119 labels = [ui.label(_('%d modified'), 'status.modified'),
3115 ui.label(_('%d added'), 'status.added'), 3120 ui.label(_('%d added'), 'status.added'),
3116 ui.label(_('%d removed'), 'status.removed'), 3121 ui.label(_('%d removed'), 'status.removed'),
3117 ui.label(_('%d deleted'), 'status.deleted'), 3122 ui.label(_('%d deleted'), 'status.deleted'),
3118 ui.label(_('%d unknown'), 'status.unknown'), 3123 ui.label(_('%d unknown'), 'status.unknown'),
3119 ui.label(_('%d ignored'), 'status.ignored'), 3124 ui.label(_('%d ignored'), 'status.ignored'),
3120 ui.label(_('%d unresolved'), 'resolve.unresolved')] 3125 ui.label(_('%d unresolved'), 'resolve.unresolved'),
3126 ui.label(_('%d subrepos'), 'status.modified')]
3121 t = [] 3127 t = []
3122 for s, l in zip(st, labels): 3128 for s, l in zip(st, labels):
3123 if s: 3129 if s:
3124 t.append(l % len(s)) 3130 t.append(l % len(s))
3125 3131
3128 3134
3129 if len(parents) > 1: 3135 if len(parents) > 1:
3130 t += _(' (merge)') 3136 t += _(' (merge)')
3131 elif branch != parents[0].branch(): 3137 elif branch != parents[0].branch():
3132 t += _(' (new branch)') 3138 t += _(' (new branch)')
3133 elif (not st[0] and not st[1] and not st[2]): 3139 elif (not st[0] and not st[1] and not st[2] and not st[7]):
3134 t += _(' (clean)') 3140 t += _(' (clean)')
3135 cleanworkdir = True 3141 cleanworkdir = True
3136 elif pnode not in bheads: 3142 elif pnode not in bheads:
3137 t += _(' (new branch head)') 3143 t += _(' (new branch head)')
3138 3144