mercurial/debugcommands.py
changeset 44307 c577bb4a04d4
parent 44306 a0ec05d93c8e
child 44309 6c07480d6659
equal deleted inserted replaced
44306:a0ec05d93c8e 44307:c577bb4a04d4
    93     dateutil,
    93     dateutil,
    94     procutil,
    94     procutil,
    95     stringutil,
    95     stringutil,
    96 )
    96 )
    97 
    97 
    98 from .revlogutils import deltas as deltautil
    98 from .revlogutils import (
       
    99     deltas as deltautil,
       
   100     nodemap,
       
   101 )
    99 
   102 
   100 release = lockmod.release
   103 release = lockmod.release
   101 
   104 
   102 command = registrar.command()
   105 command = registrar.command()
   103 
   106 
  2077         args = [b'']
  2080         args = [b'']
  2078     for a in args:
  2081     for a in args:
  2079         completions.update(n for n in names if n.startswith(a))
  2082         completions.update(n for n in names if n.startswith(a))
  2080     ui.write(b'\n'.join(sorted(completions)))
  2083     ui.write(b'\n'.join(sorted(completions)))
  2081     ui.write(b'\n')
  2084     ui.write(b'\n')
       
  2085 
       
  2086 
       
  2087 @command(
       
  2088     b'debugnodemap',
       
  2089     [(b'', b'dump', False, _(b'write persistent binary nodemap on stdin'))],
       
  2090 )
       
  2091 def debugnodemap(ui, repo, **opts):
       
  2092     """write and inspect on disk nodemap
       
  2093     """
       
  2094     if opts['dump']:
       
  2095         unfi = repo.unfiltered()
       
  2096         cl = unfi.changelog
       
  2097         data = nodemap.persistent_data(cl.index)
       
  2098         ui.write(data)
  2082 
  2099 
  2083 
  2100 
  2084 @command(
  2101 @command(
  2085     b'debugobsolete',
  2102     b'debugobsolete',
  2086     [
  2103     [