Mercurial > hg-stable
comparison mercurial/commands.py @ 9605:3194227a4158
summary: quieter with -q
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Mon, 19 Oct 2009 00:22:49 -0500 |
parents | fcc85abc762e |
children | 69f8ac71ded1 |
comparison
equal
deleted
inserted
replaced
9604:fcc85abc762e | 9605:3194227a4158 |
---|---|
2916 elif (not st[0] and not st[1] and not st[2]): | 2916 elif (not st[0] and not st[1] and not st[2]): |
2917 t += _(' (clean)') | 2917 t += _(' (clean)') |
2918 elif pnode not in bheads: | 2918 elif pnode not in bheads: |
2919 t += _(' (new branch head)') | 2919 t += _(' (new branch head)') |
2920 | 2920 |
2921 ui.write(_('commit: %s\n') % t.strip()) | 2921 if 'clean' in t: |
2922 ui.status(_('commit: %s\n') % t.strip()) | |
2923 else: | |
2924 ui.write(_('commit: %s\n') % t.strip()) | |
2922 | 2925 |
2923 # all ancestors of branch heads - all ancestors of parent = new csets | 2926 # all ancestors of branch heads - all ancestors of parent = new csets |
2924 new = [0] * len(repo) | 2927 new = [0] * len(repo) |
2925 cl = repo.changelog | 2928 cl = repo.changelog |
2926 for a in cl.ancestors(*[cl.rev(n) for n in bheads]): | 2929 for a in cl.ancestors(*[cl.rev(n) for n in bheads]): |
2928 for a in cl.ancestors(*[p.rev() for p in parents]): | 2931 for a in cl.ancestors(*[p.rev() for p in parents]): |
2929 new[a] = 0 | 2932 new[a] = 0 |
2930 new = sum(new) | 2933 new = sum(new) |
2931 | 2934 |
2932 if new == 0: | 2935 if new == 0: |
2933 ui.write(_('update: (current)\n')) | 2936 ui.status(_('update: (current)\n')) |
2934 elif pnode not in bheads: | 2937 elif pnode not in bheads: |
2935 ui.write(_('update: %d new changesets (update)\n') % new) | 2938 ui.write(_('update: %d new changesets (update)\n') % new) |
2936 else: | 2939 else: |
2937 ui.write(_('update: %d new changesets, %d branch heads (merge)\n') % | 2940 ui.write(_('update: %d new changesets, %d branch heads (merge)\n') % |
2938 (new, len(bheads))) | 2941 (new, len(bheads))) |