mercurial/debugcommands.py
changeset 51555 15e680a44502
parent 51400 e2dfa403452d
equal deleted inserted replaced
51554:a151fd01e98c 51555:15e680a44502
  4076     )
  4076     )
  4077 
  4077 
  4078 
  4078 
  4079 @command(
  4079 @command(
  4080     b'debug::unbundle',
  4080     b'debug::unbundle',
  4081     [
  4081     [],
  4082         (
  4082     _(b'FILE...'),
  4083             b'u',
       
  4084             b'update',
       
  4085             None,
       
  4086             _(b'update to new branch head if changesets were unbundled'),
       
  4087         )
       
  4088     ],
       
  4089     _(b'[-u] FILE...'),
       
  4090     helpcategory=command.CATEGORY_IMPORT_EXPORT,
  4083     helpcategory=command.CATEGORY_IMPORT_EXPORT,
  4091 )
  4084 )
  4092 def debugunbundle(ui, repo, *args, **kwargs):
  4085 def debugunbundle(ui, repo, fname1, *fnames):
  4093     """same as `hg unbundle`, but pretent to come from a push
  4086     """same as `hg unbundle`, but pretent to come from a push
  4094 
  4087 
  4095     This is useful to debug behavior and performance change in this case.
  4088     This is useful to debug behavior and performance change in this case.
  4096     """
  4089     """
  4097     from . import commands  # avoid cycle
  4090     fnames = (fname1,) + fnames
  4098 
  4091     cmdutil.unbundle_files(ui, repo, fnames)
  4099     unbundle = cmdutil.findcmd(b'unbundle', commands.table)[1][0]
       
  4100     return unbundle(ui, repo, *args, _unbundle_source=b'push', **kwargs)
       
  4101 
  4092 
  4102 
  4093 
  4103 @command(
  4094 @command(
  4104     b'debugwalk', cmdutil.walkopts, _(b'[OPTION]... [FILE]...'), inferrepo=True
  4095     b'debugwalk', cmdutil.walkopts, _(b'[OPTION]... [FILE]...'), inferrepo=True
  4105 )
  4096 )