scripts: Synced dbgbmapd3.py Lfs class changes

- Added Lfs.traverse for full filesystem traversal
- Added Rbyd.shrub flag so we can tell if an Rbyd is a shrub
- Removed redundant leaves from paths in leaf iters
This commit is contained in:
Christopher Haster
2025-04-05 02:23:52 -05:00
parent 5f06558cbe
commit 97e2786545
5 changed files with 117 additions and 14 deletions
+3
View File
@@ -454,6 +454,7 @@ class Ralt:
# our core rbyd type
class Rbyd:
def __init__(self, blocks, trunk, weight, rev, eoff, cksum, data, *,
shrub=False,
gcksumdelta=None,
corrupt=False):
if isinstance(blocks, int):
@@ -467,6 +468,7 @@ class Rbyd:
self.cksum = cksum
self.data = data
self.shrub = shrub
self.gcksumdelta = gcksumdelta
self.corrupt = corrupt
@@ -655,6 +657,7 @@ class Rbyd:
# this helps avoid race conditions with cksums and stuff
shrub = cls._fetch(rbyd.data, rbyd.block, trunk)
shrub.blocks = rbyd.blocks
shrub.shrub = True
return shrub
def lookupnext(self, rid, tag=None, *,