mercurial/debugcommands.py
changeset 30774 eaa5607132a2
parent 30743 2df983125d37
child 30775 513d68a90398
equal deleted inserted replaced
30773:c390b40fe1d7 30774:eaa5607132a2
   847         pp = r.parents(node)
   847         pp = r.parents(node)
   848         ui.write("\t%d -> %d\n" % (r.rev(pp[0]), i))
   848         ui.write("\t%d -> %d\n" % (r.rev(pp[0]), i))
   849         if pp[1] != nullid:
   849         if pp[1] != nullid:
   850             ui.write("\t%d -> %d\n" % (r.rev(pp[1]), i))
   850             ui.write("\t%d -> %d\n" % (r.rev(pp[1]), i))
   851     ui.write("}\n")
   851     ui.write("}\n")
       
   852 
       
   853 @command('debugupgraderepo', [
       
   854     ('o', 'optimize', [], _('extra optimization to perform'), _('NAME')),
       
   855     ('', 'run', False, _('performs an upgrade')),
       
   856 ])
       
   857 def debugupgraderepo(ui, repo, run=False, optimize=None):
       
   858     """upgrade a repository to use different features
       
   859 
       
   860     If no arguments are specified, the repository is evaluated for upgrade
       
   861     and a list of problems and potential optimizations is printed.
       
   862 
       
   863     With ``--run``, a repository upgrade is performed. Behavior of the upgrade
       
   864     can be influenced via additional arguments. More details will be provided
       
   865     by the command output when run without ``--run``.
       
   866 
       
   867     During the upgrade, the repository will be locked and no writes will be
       
   868     allowed.
       
   869 
       
   870     At the end of the upgrade, the repository may not be readable while new
       
   871     repository data is swapped in. This window will be as long as it takes to
       
   872     rename some directories inside the ``.hg`` directory. On most machines, this
       
   873     should complete almost instantaneously and the chances of a consumer being
       
   874     unable to access the repository should be low.
       
   875     """
       
   876     raise error.Abort(_('not yet implemented'))