Details
Details
- Reviewers
marmoute - Group Reviewers
hg-reviewers - Commits
- rHGc59e7bed8924: phabupdate: allow resigning from revisions
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Branch
- default
- Lint
No Linters Available - Unit
No Unit Test Coverage
| marmoute |
| hg-reviewers |
| No Linters Available |
| No Unit Test Coverage |
| Path | Packages | |||
|---|---|---|---|---|
| M | hgext/phabricator.py (2 lines) |
| Commit | Parents | Author | Summary | Date |
|---|---|---|---|---|
| 15a3a962479a | 2fec497717c2 | Matt Harbison | Jul 15 2020, 2:18 PM |
| Status | Author | Revision | |
|---|---|---|---|
| Closed | mharbison72 | ||
| Closed | mharbison72 | ||
| Closed | mharbison72 | ||
| Closed | mharbison72 | ||
| Closed | mharbison72 | ||
| Closed | mharbison72 |
| (b'', b'accept', False, _(b'accept revisions')), | (b'', b'accept', False, _(b'accept revisions')), | ||||
| (b'', b'reject', False, _(b'reject revisions')), | (b'', b'reject', False, _(b'reject revisions')), | ||||
| (b'', b'request-review', False, _(b'request review on revisions')), | (b'', b'request-review', False, _(b'request review on revisions')), | ||||
| (b'', b'abandon', False, _(b'abandon revisions')), | (b'', b'abandon', False, _(b'abandon revisions')), | ||||
| (b'', b'reclaim', False, _(b'reclaim revisions')), | (b'', b'reclaim', False, _(b'reclaim revisions')), | ||||
| (b'', b'close', False, _(b'close revisions')), | (b'', b'close', False, _(b'close revisions')), | ||||
| (b'', b'reopen', False, _(b'reopen revisions')), | (b'', b'reopen', False, _(b'reopen revisions')), | ||||
| (b'', b'plan-changes', False, _(b'plan changes for revisions')), | (b'', b'plan-changes', False, _(b'plan changes for revisions')), | ||||
| (b'', b'resign', False, _(b'resign as a reviewer from revisions')), | |||||
| (b'', b'commandeer', False, _(b'commandeer revisions')), | (b'', b'commandeer', False, _(b'commandeer revisions')), | ||||
| (b'm', b'comment', b'', _(b'comment on the last revision')), | (b'm', b'comment', b'', _(b'comment on the last revision')), | ||||
| ], | ], | ||||
| _(b'DREVSPEC... [OPTIONS]'), | _(b'DREVSPEC... [OPTIONS]'), | ||||
| helpcategory=command.CATEGORY_IMPORT_EXPORT, | helpcategory=command.CATEGORY_IMPORT_EXPORT, | ||||
| optionalrepo=True, | optionalrepo=True, | ||||
| ) | ) | ||||
| def phabupdate(ui, repo, *specs, **opts): | def phabupdate(ui, repo, *specs, **opts): | ||||
| """update Differential Revision in batch | """update Differential Revision in batch | ||||
| DREVSPEC selects revisions. See :hg:`help phabread` for its usage. | DREVSPEC selects revisions. See :hg:`help phabread` for its usage. | ||||
| """ | """ | ||||
| opts = pycompat.byteskwargs(opts) | opts = pycompat.byteskwargs(opts) | ||||
| transactions = [ | transactions = [ | ||||
| b'abandon', | b'abandon', | ||||
| b'accept', | b'accept', | ||||
| b'close', | b'close', | ||||
| b'commandeer', | b'commandeer', | ||||
| b'plan-changes', | b'plan-changes', | ||||
| b'reclaim', | b'reclaim', | ||||
| b'reject', | b'reject', | ||||
| b'reopen', | b'reopen', | ||||
| b'request-review', | b'request-review', | ||||
| b'resign', | |||||
| ] | ] | ||||
| flags = [n for n in transactions if opts.get(n.replace(b'-', b'_'))] | flags = [n for n in transactions if opts.get(n.replace(b'-', b'_'))] | ||||
| if len(flags) > 1: | if len(flags) > 1: | ||||
| raise error.Abort(_(b'%s cannot be used together') % b', '.join(flags)) | raise error.Abort(_(b'%s cannot be used together') % b', '.join(flags)) | ||||
| actions = [] | actions = [] | ||||
| for f in flags: | for f in flags: | ||||
| actions.append({b'type': f, b'value': True}) | actions.append({b'type': f, b'value': True}) | ||||