Show More
@@ -2089,6 +2089,8 b' def debugrevlog(ui, repo, file_=None, **' | |||
|
2089 | 2089 | nummerges = 0 |
|
2090 | 2090 | |
|
2091 | 2091 | ### tracks ways the "delta" are build |
|
2092 | # nodelta | |
|
2093 | numempty = 0 | |
|
2092 | 2094 | # full file content |
|
2093 | 2095 | numfull = 0 |
|
2094 | 2096 | # delta against previous revision |
@@ -2135,27 +2137,33 b' def debugrevlog(ui, repo, file_=None, **' | |||
|
2135 | 2137 | chainlengths.append(0) |
|
2136 | 2138 | chainbases.append(r.start(rev)) |
|
2137 | 2139 | chainspans.append(size) |
|
2138 |
|
|
|
2139 | addsize(size, fullsize) | |
|
2140 | if size == 0: | |
|
2141 | numempty += 1 | |
|
2142 | else: | |
|
2143 | numfull += 1 | |
|
2144 | addsize(size, fullsize) | |
|
2140 | 2145 | else: |
|
2141 | 2146 | chainlengths.append(chainlengths[delta] + 1) |
|
2142 | 2147 | baseaddr = chainbases[delta] |
|
2143 | 2148 | revaddr = r.start(rev) |
|
2144 | 2149 | chainbases.append(baseaddr) |
|
2145 | 2150 | chainspans.append((revaddr - baseaddr) + size) |
|
2146 | addsize(size, deltasize) | |
|
2147 |
|
|
|
2148 | numprev += 1 | |
|
2149 |
|
|
|
2150 |
|
|
|
2151 | if size == 0: | |
|
2152 | numempty += 1 | |
|
2153 | else: | |
|
2154 | addsize(size, deltasize) | |
|
2155 | if delta == rev - 1: | |
|
2156 | numprev += 1 | |
|
2157 | if delta == p1: | |
|
2158 | nump1prev += 1 | |
|
2159 | elif delta == p2: | |
|
2160 | nump2prev += 1 | |
|
2161 | elif delta == p1: | |
|
2162 | nump1 += 1 | |
|
2151 | 2163 | elif delta == p2: |
|
2152 |
nump2 |
|
|
2153 |
elif delta |
|
|
2154 |
|
|
|
2155 | elif delta == p2: | |
|
2156 | nump2 += 1 | |
|
2157 | elif delta != nullrev: | |
|
2158 | numother += 1 | |
|
2164 | nump2 += 1 | |
|
2165 | elif delta != nullrev: | |
|
2166 | numother += 1 | |
|
2159 | 2167 | |
|
2160 | 2168 | # Obtain data on the raw chunks in the revlog. |
|
2161 | 2169 | segment = r._getsegmentforrevs(rev, rev)[1] |
@@ -2176,15 +2184,15 b' def debugrevlog(ui, repo, file_=None, **' | |||
|
2176 | 2184 | if size[0] is None: |
|
2177 | 2185 | size[0] = 0 |
|
2178 | 2186 | |
|
2179 | numdeltas = numrevs - numfull | |
|
2187 | numdeltas = numrevs - numfull - numempty | |
|
2180 | 2188 | numoprev = numprev - nump1prev - nump2prev |
|
2181 | 2189 | totalrawsize = datasize[2] |
|
2182 | 2190 | datasize[2] /= numrevs |
|
2183 | 2191 | fulltotal = fullsize[2] |
|
2184 | 2192 | fullsize[2] /= numfull |
|
2185 | 2193 | deltatotal = deltasize[2] |
|
2186 |
if num |
|
|
2187 |
deltasize[2] /= num |
|
|
2194 | if numdeltas > 0: | |
|
2195 | deltasize[2] /= numdeltas | |
|
2188 | 2196 | totalsize = fulltotal + deltatotal |
|
2189 | 2197 | avgchainlen = sum(chainlengths) / numrevs |
|
2190 | 2198 | maxchainlen = max(chainlengths) |
@@ -2217,6 +2225,7 b' def debugrevlog(ui, repo, file_=None, **' | |||
|
2217 | 2225 | ui.write((' merges : ') + fmt % pcfmt(nummerges, numrevs)) |
|
2218 | 2226 | ui.write((' normal : ') + fmt % pcfmt(numrevs - nummerges, numrevs)) |
|
2219 | 2227 | ui.write(('revisions : ') + fmt2 % numrevs) |
|
2228 | ui.write((' empty : ') + fmt % pcfmt(numempty, numrevs)) | |
|
2220 | 2229 | ui.write((' full : ') + fmt % pcfmt(numfull, numrevs)) |
|
2221 | 2230 | ui.write((' deltas : ') + fmt % pcfmt(numdeltas, numrevs)) |
|
2222 | 2231 | ui.write(('revision size : ') + fmt2 % totalsize) |
@@ -23,7 +23,8 b'' | |||
|
23 | 23 | merges : 0 ( 0.00%) |
|
24 | 24 | normal : 3 (100.00%) |
|
25 | 25 | revisions : 3 |
|
26 |
|
|
|
26 | empty : 1 (33.33%) | |
|
27 | full : 2 (66.67%) | |
|
27 | 28 | deltas : 0 ( 0.00%) |
|
28 | 29 | revision size : 88 |
|
29 | 30 | full : 88 (100.00%) |
@@ -42,7 +43,7 b'' | |||
|
42 | 43 | compression ratio : 0 |
|
43 | 44 | |
|
44 | 45 | uncompressed data size (min/max/avg) : 0 / 43 / 28 |
|
45 |
full revision size (min/max/avg) : |
|
|
46 | full revision size (min/max/avg) : 44 / 44 / 44 | |
|
46 | 47 | delta size (min/max/avg) : 0 / 0 / 0 |
|
47 | 48 | #endif |
|
48 | 49 |
General Comments 0
You need to be logged in to leave comments.
Login now