diff -r 43708f92f471 -r bde7ef23340d mercurial/commands.py --- a/mercurial/commands.py Sat Oct 17 11:40:29 2015 -0700 +++ b/mercurial/commands.py Thu Oct 15 13:43:18 2015 -0700 @@ -1978,6 +1978,13 @@ ui.write(_('bundle requirements: %s\n') % ', '.join(sorted(requirements))) +@command('debugapplystreamclonebundle', [], 'FILE') +def debugapplystreamclonebundle(ui, repo, fname): + """apply a stream clone bundle file""" + f = hg.openpath(ui, fname) + gen = exchange.readbundle(ui, f, fname) + gen.apply(repo) + @command('debugcheckstate', [], '') def debugcheckstate(ui, repo): """validate the correctness of the current dirstate""" @@ -6532,6 +6539,11 @@ changes = [r.get('return', 0) for r in op.records['changegroup']] modheads = changegroup.combineresults(changes) + elif isinstance(gen, streamclone.streamcloneapplier): + raise error.Abort( + _('packed bundles cannot be applied with ' + '"hg unbundle"'), + hint=_('use "hg debugapplystreamclonebundle"')) else: modheads = gen.apply(repo, 'unbundle', 'bundle:' + fname) finally: