Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/debugcommands.py @ 41946:08fad2ca4eb6
manifestcache: further fix to debug command output
Removing more capital letters. The output will get a test once other issues get
fixed.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Thu, 14 Mar 2019 10:24:51 +0000 |
parents | 70d2d47314e5 |
children | fbee66c90cef |
comparison
equal
deleted
inserted
replaced
41945:70d2d47314e5 | 41946:08fad2ca4eb6 |
---|---|
1487 | 1487 |
1488 if not len(cache): | 1488 if not len(cache): |
1489 ui.write(_('cache empty\n')) | 1489 ui.write(_('cache empty\n')) |
1490 else: | 1490 else: |
1491 ui.write( | 1491 ui.write( |
1492 _('Cache contains %d manifest entries, in order of most to ' | 1492 _('cache contains %d manifest entries, in order of most to ' |
1493 'least recent:\n') % (len(cache),)) | 1493 'least recent:\n') % (len(cache),)) |
1494 totalsize = 0 | 1494 totalsize = 0 |
1495 for nodeid in cache: | 1495 for nodeid in cache: |
1496 # Use cache.get to not update the LRU order | 1496 # Use cache.get to not update the LRU order |
1497 data = cache.get(nodeid) | 1497 data = cache.get(nodeid) |
1499 totalsize += size + 24 # 20 bytes nodeid, 4 bytes size | 1499 totalsize += size + 24 # 20 bytes nodeid, 4 bytes size |
1500 ui.write(_('id: %s, size %s\n') % ( | 1500 ui.write(_('id: %s, size %s\n') % ( |
1501 hex(nodeid), util.bytecount(size))) | 1501 hex(nodeid), util.bytecount(size))) |
1502 ondisk = cache._opener.stat('manifestfulltextcache').st_size | 1502 ondisk = cache._opener.stat('manifestfulltextcache').st_size |
1503 ui.write( | 1503 ui.write( |
1504 _('Total cache data size %s, on-disk %s\n') % ( | 1504 _('total cache data size %s, on-disk %s\n') % ( |
1505 util.bytecount(totalsize), util.bytecount(ondisk)) | 1505 util.bytecount(totalsize), util.bytecount(ondisk)) |
1506 ) | 1506 ) |
1507 | 1507 |
1508 @command('debugmergestate', [], '') | 1508 @command('debugmergestate', [], '') |
1509 def debugmergestate(ui, repo, *args): | 1509 def debugmergestate(ui, repo, *args): |