D6512: phabricator: add --blocker argument to phabsend to specify blocking reviewers
Kwan (Ian Moody)
phabricator at mercurial-scm.org
Wed Jun 12 12:44:59 EDT 2019
Closed by commit rHGf33d3ee110da: phabricator: add --blocker argument to phabsend to specify blocking reviewers (authored by Kwan).
This revision was automatically updated to reflect the committed changes.
This revision was not accepted when it landed; it landed in state "Needs Review".
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D6512?vs=15447&id=15454
CHANGES SINCE LAST ACTION
https://phab.mercurial-scm.org/D6512/new/
REVISION DETAIL
https://phab.mercurial-scm.org/D6512
AFFECTED FILES
hgext/phabricator.py
CHANGE DETAILS
diff --git a/hgext/phabricator.py b/hgext/phabricator.py
--- a/hgext/phabricator.py
+++ b/hgext/phabricator.py
@@ -515,6 +515,7 @@
[(b'r', b'rev', [], _(b'revisions to send'), _(b'REV')),
(b'', b'amend', True, _(b'update commit messages')),
(b'', b'reviewer', [], _(b'specify reviewers')),
+ (b'', b'blocker', [], _(b'specify blocking reviewers')),
(b'm', b'comment', b'',
_(b'add a comment to Revisions with new/updated Diffs')),
(b'', b'confirm', None, _(b'ask for confirmation before sending'))],
@@ -568,8 +569,15 @@
actions = []
reviewers = opts.get(b'reviewer', [])
+ blockers = opts.get(b'blocker', [])
+ phids = []
if reviewers:
- phids = userphids(repo, reviewers)
+ phids.extend(userphids(repo, reviewers))
+ if blockers:
+ phids.extend(map(
+ lambda phid: b'blocking(%s)' % phid, userphids(repo, blockers)
+ ))
+ if phids:
actions.append({b'type': b'reviewers.add', b'value': phids})
drevids = [] # [int]
To: Kwan, durin42, mharbison72, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list