diff tests/test-lfs-serve.t @ 39857:8dab7c8a93eb

upgrade: report size of backing files, not internal storage size upgrade.py is the only consumer of filelog.index, which I'd like to eliminate from the file storage interface. This commit changes the upgrade code to report the storage size of files by looking at the size of the files backing its storage instead of looking at the index. I'm not convinced the approach in this patch will live very long because it is relying on low-level attributes like "opener" and "files," which may behave very differently on non-revlog storage. But the data is only used for reporting purposes and it does get us one step closer to eliminating "index." A side-effect of this change is we now report the size of the revlog index data - not just the revision data. I think this is more accurate. Differential Revision: https://phab.mercurial-scm.org/D4717
author Gregory Szorc <gregory.szorc@gmail.com>
date Mon, 24 Sep 2018 09:37:19 -0700
parents 5abc47d4ca6b
children 393e44324037
line wrap: on
line diff
--- a/tests/test-lfs-serve.t	Thu Sep 20 18:07:42 2018 -0700
+++ b/tests/test-lfs-serve.t	Mon Sep 24 09:37:19 2018 -0700
@@ -114,12 +114,12 @@
   creating temporary repository to stage migrated data: * (glob)
   (it is safe to interrupt this process any time before data migration completes)
   migrating 3 total revisions (1 in filelogs, 1 in manifests, 1 in changelog)
-  migrating 132 bytes in store; 129 bytes tracked data
-  migrating 1 filelogs containing 1 revisions (9 bytes in store; 8 bytes tracked data)
+  migrating 324 bytes in store; 129 bytes tracked data
+  migrating 1 filelogs containing 1 revisions (73 bytes in store; 8 bytes tracked data)
   finished migrating 1 filelog revisions across 1 filelogs; change in size: 0 bytes
-  migrating 1 manifests containing 1 revisions (53 bytes in store; 52 bytes tracked data)
+  migrating 1 manifests containing 1 revisions (117 bytes in store; 52 bytes tracked data)
   finished migrating 1 manifest revisions across 1 manifests; change in size: 0 bytes
-  migrating changelog containing 1 revisions (70 bytes in store; 69 bytes tracked data)
+  migrating changelog containing 1 revisions (134 bytes in store; 69 bytes tracked data)
   finished migrating 1 changelog revisions; change in size: 0 bytes
   finished migrating 3 total revisions; total change in store size: 0 bytes
   copying phaseroots