Also print "(Root)" if the filename is empty.
Details
- Reviewers
durham - Group Reviewers
Restricted Project - Commits
- rFBHGX7b48a810ee5a: debugdatapack: print delta and blob size totals and compression %
Diff Detail
- Repository
- rFBHGX Facebook Mercurial Extensions
- Lint
Lint Skipped - Unit
Unit Tests Skipped
Event Timeline
Some tweaks suggested in the comments, but not enough to block accepting.
remotefilelog/debugcommands.py | ||
---|---|---|
221 | It seems odd that the dictionary keeps track of all the old sizes as well. Since we print out the accumulated data after each file's batch of entries, seems like these could just be int's that we reset to 0 every time we do a print. Especially since if we don't do this then if a file appears non-contiguously twice in a pack, the second one will show totals that include the first ones numbers, which will be confusing UI wise since the columns above the total won't match the total. | |
232 | I wouldn't hard code "root" here, since that is naming specific to the tree implementation and the pack files are arbitrary storage. Maybe "(empty)" or "(empty name)" or something instead. |
It seems odd that the dictionary keeps track of all the old sizes as well. Since we print out the accumulated data after each file's batch of entries, seems like these could just be int's that we reset to 0 every time we do a print.
Especially since if we don't do this then if a file appears non-contiguously twice in a pack, the second one will show totals that include the first ones numbers, which will be confusing UI wise since the columns above the total won't match the total.