diff -r e9304c39e075 -r e2dfa403452d mercurial/debugcommands.py --- a/mercurial/debugcommands.py Wed Feb 14 08:14:46 2024 +0100 +++ b/mercurial/debugcommands.py Fri Feb 23 04:26:03 2024 +0100 @@ -4077,6 +4077,30 @@ @command( + b'debug::unbundle', + [ + ( + b'u', + b'update', + None, + _(b'update to new branch head if changesets were unbundled'), + ) + ], + _(b'[-u] FILE...'), + helpcategory=command.CATEGORY_IMPORT_EXPORT, +) +def debugunbundle(ui, repo, *args, **kwargs): + """same as `hg unbundle`, but pretent to come from a push + + This is useful to debug behavior and performance change in this case. + """ + from . import commands # avoid cycle + + unbundle = cmdutil.findcmd(b'unbundle', commands.table)[1][0] + return unbundle(ui, repo, *args, _unbundle_source=b'push', **kwargs) + + +@command( b'debugwalk', cmdutil.walkopts, _(b'[OPTION]... [FILE]...'), inferrepo=True ) def debugwalk(ui, repo, *pats, **opts):