comparison mercurial/scmutil.py @ 39088:ad88726d6982

addremove: add labels for messages about added and removed files This is the first step to add color for add and remove output.
author Boris Feld <boris.feld@octobus.net>
date Wed, 25 Jul 2018 17:11:52 +0200
parents a01200b25da6
children 7a759ad2d06d
comparison
equal deleted inserted replaced
39087:f90b333e79cb 39088:ad88726d6982
1003 toprint.update(deleted) 1003 toprint.update(deleted)
1004 for abs in sorted(toprint): 1004 for abs in sorted(toprint):
1005 if repo.ui.verbose or not m.exact(abs): 1005 if repo.ui.verbose or not m.exact(abs):
1006 if abs in unknownset: 1006 if abs in unknownset:
1007 status = _('adding %s\n') % m.uipath(abs) 1007 status = _('adding %s\n') % m.uipath(abs)
1008 label = 'addremove.added'
1008 else: 1009 else:
1009 status = _('removing %s\n') % m.uipath(abs) 1010 status = _('removing %s\n') % m.uipath(abs)
1010 repo.ui.status(status) 1011 label = 'addremove.removed'
1012 repo.ui.status(status, label=label)
1011 1013
1012 renames = _findrenames(repo, m, added + unknown, removed + deleted, 1014 renames = _findrenames(repo, m, added + unknown, removed + deleted,
1013 similarity) 1015 similarity)
1014 1016
1015 if not dry_run: 1017 if not dry_run: