[PATCH] debugbundle: add --part-type flag to emit only named part types

Yuya Nishihara yuya at tcha.org
Tue Jun 6 08:36:02 EDT 2017


On Mon, 05 Jun 2017 16:37:43 -0700, danek.duvall at oracle.com wrote:
> # HG changeset patch
> # User Danek Duvall <danek.duvall at oracle.com>
> # Date 1496704781 25200
> #      Mon Jun 05 16:19:41 2017 -0700
> # Node ID 67209fdbca98cf2a38b05cb06f093dc376803590
> # Parent  e696f597d02f971eeed1217096b8f200ddb903d2
> debugbundle: add --part-type flag to emit only named part types
> 
> This removes the need in the tests for grep -A, which is not supported on
> Solaris.

Queued, thanks.

> 
> diff --git a/mercurial/debugcommands.py b/mercurial/debugcommands.py
> --- a/mercurial/debugcommands.py
> +++ b/mercurial/debugcommands.py
> @@ -314,7 +314,10 @@ def _debugbundle2(ui, gen, all=None, **o
>      if not isinstance(gen, bundle2.unbundle20):
>          raise error.Abort(_('not a bundle2 file'))
>      ui.write(('Stream params: %s\n' % repr(gen.params)))
> +    part_types = opts.get('part_type', [])
>      for part in gen.iterparts():
> +        if part_types and part.type not in part_types:

Changed the variable name to parttypes per our coding style.


More information about the Mercurial-devel mailing list