mercurial/debugcommands.py
changeset 44309 6c07480d6659
parent 44307 c577bb4a04d4
child 44318 20e125cdd719
equal deleted inserted replaced
44308:5962fd0d1045 44309:6c07480d6659
  2084     ui.write(b'\n')
  2084     ui.write(b'\n')
  2085 
  2085 
  2086 
  2086 
  2087 @command(
  2087 @command(
  2088     b'debugnodemap',
  2088     b'debugnodemap',
  2089     [(b'', b'dump', False, _(b'write persistent binary nodemap on stdin'))],
  2089     [
       
  2090         (
       
  2091             b'',
       
  2092             b'dump-new',
       
  2093             False,
       
  2094             _(b'write a (new) persistent binary nodemap on stdin'),
       
  2095         ),
       
  2096         (b'', b'dump-disk', False, _(b'dump on-disk data on stdin')),
       
  2097     ],
  2090 )
  2098 )
  2091 def debugnodemap(ui, repo, **opts):
  2099 def debugnodemap(ui, repo, **opts):
  2092     """write and inspect on disk nodemap
  2100     """write and inspect on disk nodemap
  2093     """
  2101     """
  2094     if opts['dump']:
  2102     if opts['dump_new']:
  2095         unfi = repo.unfiltered()
  2103         unfi = repo.unfiltered()
  2096         cl = unfi.changelog
  2104         cl = unfi.changelog
  2097         data = nodemap.persistent_data(cl.index)
  2105         data = nodemap.persistent_data(cl.index)
       
  2106         ui.write(data)
       
  2107     elif opts['dump_disk']:
       
  2108         unfi = repo.unfiltered()
       
  2109         cl = unfi.changelog
       
  2110         data = nodemap.persisted_data(cl)
  2098         ui.write(data)
  2111         ui.write(data)
  2099 
  2112 
  2100 
  2113 
  2101 @command(
  2114 @command(
  2102     b'debugobsolete',
  2115     b'debugobsolete',