Show More
@@ -2386,6 +2386,16 b' def purge(' | |||||
2386 | elif nb_ignored: |
|
2386 | elif nb_ignored: | |
2387 | msg = _(b"permanently delete %d ignored files?") |
|
2387 | msg = _(b"permanently delete %d ignored files?") | |
2388 | msg %= nb_ignored |
|
2388 | msg %= nb_ignored | |
|
2389 | elif removeemptydirs: | |||
|
2390 | dir_count = 0 | |||
|
2391 | for f in directories: | |||
|
2392 | if matcher(f) and not repo.wvfs.listdir(f): | |||
|
2393 | dir_count += 1 | |||
|
2394 | if dir_count: | |||
|
2395 | msg = _( | |||
|
2396 | b"permanently delete at least %d empty directories?" | |||
|
2397 | ) | |||
|
2398 | msg %= dir_count | |||
2389 | else: |
|
2399 | else: | |
2390 | # XXX we might be missing directory there |
|
2400 | # XXX we might be missing directory there | |
2391 | return res |
|
2401 | return res |
@@ -23,6 +23,10 b' delete an empty directory' | |||||
23 | $ mkdir empty_dir |
|
23 | $ mkdir empty_dir | |
24 | $ hg purge -p -v |
|
24 | $ hg purge -p -v | |
25 | empty_dir |
|
25 | empty_dir | |
|
26 | $ hg purge --confirm | |||
|
27 | permanently delete at least 1 empty directories? (yN) n | |||
|
28 | abort: removal cancelled | |||
|
29 | [250] | |||
26 | $ hg purge -v |
|
30 | $ hg purge -v | |
27 | removing directory empty_dir |
|
31 | removing directory empty_dir | |
28 | $ ls -A |
|
32 | $ ls -A |
General Comments 0
You need to be logged in to leave comments.
Login now