[PATCH v2] patchbomb: add -B option to select a bookmark

Yuya Nishihara yuya at tcha.org
Fri Jun 2 14:33:38 UTC 2017


On Tue, 30 May 2017 11:14:11 +0200, David Demelier wrote:
> # HG changeset patch
> # User David Demelier <demelier.david at gmail.com>
> # Date 1486130547 -3600
> #      Fri Feb 03 15:02:27 2017 +0100
> # Node ID 78767485c1feff1593ca39c8986a29abd44cc567
> # Parent  1df80eff24cfbde6654149bd8aa969f246672405
> patchbomb: add -B option to select a bookmark

Generally looks good. Queued, thanks.

I found a couple of nits, so can you make follow-up patches?

> diff -r 1df80eff24cf -r 78767485c1fe hgext/patchbomb.py

> @@ -540,13 +547,16 @@
>      mbox = opts.get('mbox')
>      outgoing = opts.get('outgoing')
>      rev = opts.get('rev')
> +    bookmark = opts.get('bookmark')

> +    # internal option used by pbranches
> +    patches = opts.get('patches')

This looks like a merge error. Dropped.

> @@ -565,6 +575,10 @@
>          if revs:
>              raise error.Abort(_('use only one form to specify the revision'))
>          revs = rev
> +    elif bookmark:

-r and -B are mutually exclusive, so we should reject if both are specified.

> +        if not bookmark in repo._bookmarks:
> +            raise error.Abort(_("bookmark '%s' not found") % bookmark)
> +        revs = repair.stripbmrevset(repo, bookmark)

Perhaps stripbmrevset() needs a better name and should be moved to e.g. scmutil.

> +  Message-Id: <patchbomb.347155260 at localhost.localdomain>
> +  User-Agent: Mercurial-patchbomb/4.2+374-2f9ccd83ecf8

Masked these platform specific outputs.


More information about the Mercurial-devel mailing list