mercurial/debugcommands.py
changeset 50944 32fe4af9971d
parent 50943 4135e7271b9e
child 50945 f7c35a645c2e
equal deleted inserted replaced
50943:4135e7271b9e 50944:32fe4af9971d
   797     :``readdensity``:  density of useful bytes in the data read from the disk
   797     :``readdensity``:  density of useful bytes in the data read from the disk
   798     :``srchunks``:  in how many data hunks the whole revision would be read
   798     :``srchunks``:  in how many data hunks the whole revision would be read
   799 
   799 
   800     The sparse read can be enabled with experimental.sparse-read = True
   800     The sparse read can be enabled with experimental.sparse-read = True
   801     """
   801     """
   802     opts = pycompat.byteskwargs(opts)
   802     r = cmdutil.openrevlog(
   803     r = cmdutil.openrevlog(repo, b'debugdeltachain', file_, opts)
   803         repo, b'debugdeltachain', file_, pycompat.byteskwargs(opts)
       
   804     )
   804     index = r.index
   805     index = r.index
   805     start = r.start
   806     start = r.start
   806     length = r.length
   807     length = r.length
   807     generaldelta = r._generaldelta
   808     generaldelta = r._generaldelta
   808     withsparseread = getattr(r, '_withsparseread', False)
   809     withsparseread = getattr(r, '_withsparseread', False)
   888             chain_size += e[revlog_constants.ENTRY_DATA_COMPRESSED_LENGTH]
   889             chain_size += e[revlog_constants.ENTRY_DATA_COMPRESSED_LENGTH]
   889         chain_size_cache[rev] = chain_size
   890         chain_size_cache[rev] = chain_size
   890 
   891 
   891         return p1, p2, compsize, uncompsize, deltatype, chain, chain_size
   892         return p1, p2, compsize, uncompsize, deltatype, chain, chain_size
   892 
   893 
   893     fm = ui.formatter(b'debugdeltachain', opts)
   894     fm = ui.formatter(b'debugdeltachain', pycompat.byteskwargs(opts))
   894 
   895 
   895     fm.plain(
   896     fm.plain(
   896         b'    rev      p1      p2  chain# chainlen     prev   delta       '
   897         b'    rev      p1      p2  chain# chainlen     prev   delta       '
   897         b'size    rawsize  chainsize     ratio   lindist extradist '
   898         b'size    rawsize  chainsize     ratio   lindist extradist '
   898         b'extraratio'
   899         b'extraratio'