diff --git a/hgext/purge.py b/hgext/purge.py index 35ac807f941c514470de2c2708a5886f8b61f089_aGdleHQvcHVyZ2UucHk=..f1c3ba167b0c73207c726b5a68c59c9b14560d2e_aGdleHQvcHVyZ2UucHk= 100644 --- a/hgext/purge.py +++ b/hgext/purge.py @@ -101,8 +101,9 @@ status = repo.status(match=match, ignored=opts['all'], unknown=True) for f in sorted(status[4] + status[5]): - ui.note(_('removing file %s\n') % f) + if act: + ui.note(_('removing file %s\n') % f) remove(removefile, f) for f in sorted(directories, reverse=True): if match(f) and not os.listdir(repo.wjoin(f)): @@ -105,6 +106,7 @@ remove(removefile, f) for f in sorted(directories, reverse=True): if match(f) and not os.listdir(repo.wjoin(f)): - ui.note(_('removing directory %s\n') % f) + if act: + ui.note(_('removing directory %s\n') % f) remove(os.rmdir, f) diff --git a/tests/test-purge.t b/tests/test-purge.t index 35ac807f941c514470de2c2708a5886f8b61f089_dGVzdHMvdGVzdC1wdXJnZS50..f1c3ba167b0c73207c726b5a68c59c9b14560d2e_dGVzdHMvdGVzdC1wdXJnZS50 100644 --- a/tests/test-purge.t +++ b/tests/test-purge.t @@ -21,7 +21,7 @@ delete an empty directory $ mkdir empty_dir - $ hg purge -p + $ hg purge -p -v empty_dir $ hg purge -v removing directory empty_dir