Show More
@@ -388,14 +388,12 b' def gcserver(ui, repo):' | |||
|
388 | 388 | days = repo.ui.configint("remotefilelog", "serverexpiration") |
|
389 | 389 | expiration = time.time() - (days * 24 * 60 * 60) |
|
390 | 390 | |
|
391 |
|
|
|
392 | count = 0 | |
|
393 | ui.progress(_removing, count, unit="files") | |
|
391 | progress = ui.makeprogress(_("removing old server cache"), unit="files") | |
|
392 | progress.update(0) | |
|
394 | 393 | for root, dirs, files in os.walk(cachepath): |
|
395 | 394 | for file in files: |
|
396 | 395 | filepath = os.path.join(root, file) |
|
397 | count += 1 | |
|
398 | ui.progress(_removing, count, unit="files") | |
|
396 | progress.increment() | |
|
399 | 397 | if filepath in neededfiles: |
|
400 | 398 | continue |
|
401 | 399 | |
@@ -403,4 +401,4 b' def gcserver(ui, repo):' | |||
|
403 | 401 | if stat.st_mtime < expiration: |
|
404 | 402 | os.remove(filepath) |
|
405 | 403 | |
|
406 | ui.progress(_removing, None) | |
|
404 | progress.complete() |
General Comments 0
You need to be logged in to leave comments.
Login now