Homec4science

Allow monogrammed objects to be parsed from the `arc` command line in…

Authored by epriestley <git@epriestley.com> on May 13 2016, 16:56.

Description

Allow monogrammed objects to be parsed from the arc command line in "Reviewers" and similar fields

Summary:
Ref T10939. This allows the CLI to parse reviewers and subscribers like this:

Reviewers: epriestley, O123 Some Package Name

The rule goes:

  • If a reviewer or subscriber starts with a monogram (like X111), just look that up and ignore everything until the next comma.
  • Otherwise, split it on spaces and look up each part.

This means that these are valid:

alincoln htaft
alincoln, htaft
#a #b epriestley
O123 Some Package, epriestley, #b

I think the only real downside is that this:

O123 Some Package epriestley

...ignores the "epriestley" part. However, I don't expect users to be typing package monograms manually -- they just need to be representable by arc land and arc diff --edit and such. Those flows will always add commas and make the parse unambiguous.

Test Plan:

  • Added test coverage.
  • amend --show'd a revision with a package subscriber (this isn't currently possible to produce using the web UI, it came from a future change) and saw Subscribers: O123 package name, usera, userb.
  • Updated a revision with a package subscriber.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10939

Differential Revision: https://secure.phabricator.com/D15911

Details

Committed
epriestley <git@epriestley.com>May 14 2016, 02:18
Pushed
aubortJan 31 2017, 17:16
Parents
rPH9abc16df4df5: Give Owners packages the "O" monogram
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPH3ea47d967ab7: Allow monogrammed objects to be parsed from the `arc` command line in… (authored by epriestley <git@epriestley.com>).May 14 2016, 02:18