diff --git a/mercurial/debugcommands.py b/mercurial/debugcommands.py --- a/mercurial/debugcommands.py +++ b/mercurial/debugcommands.py @@ -2091,6 +2091,8 @@ def debugrevlog(ui, repo, file_=None, ** ### tracks ways the "delta" are build # nodelta numempty = 0 + numemptytext = 0 + numemptydelta = 0 # full file content numfull = 0 # delta against previous revision @@ -2139,6 +2141,7 @@ def debugrevlog(ui, repo, file_=None, ** chainspans.append(size) if size == 0: numempty += 1 + numemptytext += 1 else: numfull += 1 addsize(size, fullsize) @@ -2150,6 +2153,7 @@ def debugrevlog(ui, repo, file_=None, ** chainspans.append((revaddr - baseaddr) + size) if size == 0: numempty += 1 + numemptydelta += 1 else: addsize(size, deltasize) if delta == rev - 1: @@ -2226,6 +2230,10 @@ def debugrevlog(ui, repo, file_=None, ** ui.write((' normal : ') + fmt % pcfmt(numrevs - nummerges, numrevs)) ui.write(('revisions : ') + fmt2 % numrevs) ui.write((' empty : ') + fmt % pcfmt(numempty, numrevs)) + ui.write((' text : ') + + fmt % pcfmt(numemptytext, numemptytext + numemptydelta)) + ui.write((' delta : ') + + fmt % pcfmt(numemptydelta, numemptytext + numemptydelta)) ui.write((' full : ') + fmt % pcfmt(numfull, numrevs)) ui.write((' deltas : ') + fmt % pcfmt(numdeltas, numrevs)) ui.write(('revision size : ') + fmt2 % totalsize) diff --git a/tests/test-debugcommands.t b/tests/test-debugcommands.t --- a/tests/test-debugcommands.t +++ b/tests/test-debugcommands.t @@ -24,6 +24,8 @@ normal : 3 (100.00%) revisions : 3 empty : 1 (33.33%) + text : 1 (100.00%) + delta : 0 ( 0.00%) full : 2 (66.67%) deltas : 0 ( 0.00%) revision size : 88