Show More
@@ -2095,6 +2095,8 b' def debugrevlog(ui, repo, file_=None, **' | |||
|
2095 | 2095 | numemptydelta = 0 |
|
2096 | 2096 | # full file content |
|
2097 | 2097 | numfull = 0 |
|
2098 | # intermediate snapshot against a prior snapshot | |
|
2099 | numsemi = 0 | |
|
2098 | 2100 | # delta against previous revision |
|
2099 | 2101 | numprev = 0 |
|
2100 | 2102 | # delta against first or second parent (not prev) |
@@ -2115,6 +2117,7 b' def debugrevlog(ui, repo, file_=None, **' | |||
|
2115 | 2117 | # data about each revision |
|
2116 | 2118 | datasize = [None, 0, 0] |
|
2117 | 2119 | fullsize = [None, 0, 0] |
|
2120 | semisize = [None, 0, 0] | |
|
2118 | 2121 | deltasize = [None, 0, 0] |
|
2119 | 2122 | chunktypecounts = {} |
|
2120 | 2123 | chunktypesizes = {} |
@@ -2154,6 +2157,9 b' def debugrevlog(ui, repo, file_=None, **' | |||
|
2154 | 2157 | if size == 0: |
|
2155 | 2158 | numempty += 1 |
|
2156 | 2159 | numemptydelta += 1 |
|
2160 | elif r.issnapshot(rev): | |
|
2161 | addsize(size, semisize) | |
|
2162 | numsemi += 1 | |
|
2157 | 2163 | else: |
|
2158 | 2164 | addsize(size, deltasize) |
|
2159 | 2165 | if delta == rev - 1: |
@@ -2187,20 +2193,23 b' def debugrevlog(ui, repo, file_=None, **' | |||
|
2187 | 2193 | chunktypesizes[chunktype] += size |
|
2188 | 2194 | |
|
2189 | 2195 | # Adjust size min value for empty cases |
|
2190 | for size in (datasize, fullsize, deltasize): | |
|
2196 | for size in (datasize, fullsize, semisize, deltasize): | |
|
2191 | 2197 | if size[0] is None: |
|
2192 | 2198 | size[0] = 0 |
|
2193 | 2199 | |
|
2194 | numdeltas = numrevs - numfull - numempty | |
|
2200 | numdeltas = numrevs - numfull - numempty - numsemi | |
|
2195 | 2201 | numoprev = numprev - nump1prev - nump2prev |
|
2196 | 2202 | totalrawsize = datasize[2] |
|
2197 | 2203 | datasize[2] /= numrevs |
|
2198 | 2204 | fulltotal = fullsize[2] |
|
2199 | 2205 | fullsize[2] /= numfull |
|
2206 | semitotal = semisize[2] | |
|
2207 | if 0 < numsemi: | |
|
2208 | semisize[2] /= numsemi | |
|
2200 | 2209 | deltatotal = deltasize[2] |
|
2201 | 2210 | if numdeltas > 0: |
|
2202 | 2211 | deltasize[2] /= numdeltas |
|
2203 | totalsize = fulltotal + deltatotal | |
|
2212 | totalsize = fulltotal + semitotal + deltatotal | |
|
2204 | 2213 | avgchainlen = sum(chainlengths) / numrevs |
|
2205 | 2214 | maxchainlen = max(chainlengths) |
|
2206 | 2215 | maxchainspan = max(chainspans) |
@@ -2238,9 +2247,11 b' def debugrevlog(ui, repo, file_=None, **' | |||
|
2238 | 2247 | ui.write((' delta : ') |
|
2239 | 2248 | + fmt % pcfmt(numemptydelta, numemptytext + numemptydelta)) |
|
2240 | 2249 | ui.write((' full : ') + fmt % pcfmt(numfull, numrevs)) |
|
2250 | ui.write((' inter : ') + fmt % pcfmt(numsemi, numrevs)) | |
|
2241 | 2251 | ui.write((' deltas : ') + fmt % pcfmt(numdeltas, numrevs)) |
|
2242 | 2252 | ui.write(('revision size : ') + fmt2 % totalsize) |
|
2243 | 2253 | ui.write((' full : ') + fmt % pcfmt(fulltotal, totalsize)) |
|
2254 | ui.write((' inter : ') + fmt % pcfmt(semitotal, totalsize)) | |
|
2244 | 2255 | ui.write((' deltas : ') + fmt % pcfmt(deltatotal, totalsize)) |
|
2245 | 2256 | |
|
2246 | 2257 | def fmtchunktype(chunktype): |
@@ -27,9 +27,11 b'' | |||
|
27 | 27 | text : 0 (100.00%) |
|
28 | 28 | delta : 0 (100.00%) |
|
29 | 29 | full : 3 (100.00%) |
|
30 | inter : 0 ( 0.00%) | |
|
30 | 31 | deltas : 0 ( 0.00%) |
|
31 | 32 | revision size : 191 |
|
32 | 33 | full : 191 (100.00%) |
|
34 | inter : 0 ( 0.00%) | |
|
33 | 35 | deltas : 0 ( 0.00%) |
|
34 | 36 | |
|
35 | 37 | chunks : 3 |
@@ -57,9 +59,11 b'' | |||
|
57 | 59 | text : 1 (100.00%) |
|
58 | 60 | delta : 0 ( 0.00%) |
|
59 | 61 | full : 2 (66.67%) |
|
62 | inter : 0 ( 0.00%) | |
|
60 | 63 | deltas : 0 ( 0.00%) |
|
61 | 64 | revision size : 88 |
|
62 | 65 | full : 88 (100.00%) |
|
66 | inter : 0 ( 0.00%) | |
|
63 | 67 | deltas : 0 ( 0.00%) |
|
64 | 68 | |
|
65 | 69 | chunks : 3 |
@@ -89,9 +93,11 b'' | |||
|
89 | 93 | text : 0 (100.00%) |
|
90 | 94 | delta : 0 (100.00%) |
|
91 | 95 | full : 1 (100.00%) |
|
96 | inter : 0 ( 0.00%) | |
|
92 | 97 | deltas : 0 ( 0.00%) |
|
93 | 98 | revision size : 3 |
|
94 | 99 | full : 3 (100.00%) |
|
100 | inter : 0 ( 0.00%) | |
|
95 | 101 | deltas : 0 ( 0.00%) |
|
96 | 102 | |
|
97 | 103 | chunks : 1 |
General Comments 0
You need to be logged in to leave comments.
Login now