Page MenuHomePhabricator

registrar: add support for storing the type of command in func object
ClosedPublic

Authored by pulkit on Sep 19 2017, 9:36 PM.

Details

Summary

This patch adds support for storing the type of command which is going to run in
the func object. For this it does the following:

  1. Add three possible values as attributes to the registrar.command class
  2. Add a new argument to registrar.command._doregister function
  3. Add a new attribute cmdtype to the func object

The type of command will be helpful in deciding what level of access on hidden
commits it can has.

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

pulkit created this revision.Sep 19 2017, 9:36 PM
durham accepted this revision.Sep 26 2017, 8:12 AM
durham added a subscriber: durham.

Minor comments, but lgtm

mercurial/registrar.py
148

Might be worth a comment describing what these mean, since it's not obvious without context.

155

These should probably refer to the class constants instead of hard coding duplicate strings.

pulkit planned changes to this revision.Oct 10 2017, 5:34 PM
pulkit edited the summary of this revision. (Show Details)Oct 11 2017, 3:10 PM
pulkit retitled this revision from directaccess: add support for storing the type of command in func object to registrar: add support for storing the type of command in func object.
pulkit updated this revision to Diff 2595.
durin42 accepted this revision.Oct 16 2017, 9:11 PM
This revision is now accepted and ready to land.Oct 16 2017, 9:11 PM
This revision was automatically updated to reflect the committed changes.