Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/cmdutil.py @ 35144:7a58608281dd
remove: print message for each file in verbose mode only while using `-A` (BC)
hg rm -A option prints the message of every file in the repo. This is not very
user friendly for a big repository with thousands of files. So enabling this
feature only when run in --verbose mode (hg rm -Av)
Differential Revision: https://phab.mercurial-scm.org/D1336
author | pavanpc@fb.com |
---|---|
date | Fri, 17 Nov 2017 22:52:40 +0000 |
parents | b22a0d9e0a83 |
children | 3da4bd50103d |
comparison
equal
deleted
inserted
replaced
35143:ff80efc8f3e4 | 35144:7a58608281dd |
---|---|
2980 total = len(remaining) | 2980 total = len(remaining) |
2981 count = 0 | 2981 count = 0 |
2982 for f in remaining: | 2982 for f in remaining: |
2983 count += 1 | 2983 count += 1 |
2984 ui.progress(_('skipping'), count, total=total, unit=_('files')) | 2984 ui.progress(_('skipping'), count, total=total, unit=_('files')) |
2985 warnings.append(_('not removing %s: file still exists\n') | 2985 if ui.verbose or (f in files): |
2986 % m.rel(f)) | 2986 warnings.append(_('not removing %s: file still exists\n') |
2987 % m.rel(f)) | |
2987 ret = 1 | 2988 ret = 1 |
2988 ui.progress(_('skipping'), None) | 2989 ui.progress(_('skipping'), None) |
2989 else: | 2990 else: |
2990 list = deleted + clean | 2991 list = deleted + clean |
2991 total = len(modified) + len(added) | 2992 total = len(modified) + len(added) |