##// END OF EJS Templates
purge: avoid duplicate output for --print (issue4092)...
anuraggoel -
r20565:f1c3ba16 stable
parent child Browse files
Show More
@@ -101,10 +101,12 b' def purge(ui, repo, *dirs, **opts):'
101 status = repo.status(match=match, ignored=opts['all'], unknown=True)
101 status = repo.status(match=match, ignored=opts['all'], unknown=True)
102
102
103 for f in sorted(status[4] + status[5]):
103 for f in sorted(status[4] + status[5]):
104 ui.note(_('removing file %s\n') % f)
104 if act:
105 ui.note(_('removing file %s\n') % f)
105 remove(removefile, f)
106 remove(removefile, f)
106
107
107 for f in sorted(directories, reverse=True):
108 for f in sorted(directories, reverse=True):
108 if match(f) and not os.listdir(repo.wjoin(f)):
109 if match(f) and not os.listdir(repo.wjoin(f)):
109 ui.note(_('removing directory %s\n') % f)
110 if act:
111 ui.note(_('removing directory %s\n') % f)
110 remove(os.rmdir, f)
112 remove(os.rmdir, f)
@@ -21,7 +21,7 b' setup'
21 delete an empty directory
21 delete an empty directory
22
22
23 $ mkdir empty_dir
23 $ mkdir empty_dir
24 $ hg purge -p
24 $ hg purge -p -v
25 empty_dir
25 empty_dir
26 $ hg purge -v
26 $ hg purge -v
27 removing directory empty_dir
27 removing directory empty_dir
General Comments 0
You need to be logged in to leave comments. Login now