From 4f21054c2841809da5e1e600b1cc765811288a80 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Mon, 14 Jun 2021 16:05:19 -0400 Subject: commands: document the "common" class attribute Switch it to uppercase to make it clear it's a constant, and add documentation so its usage is clear. Change-Id: I6d281a66a90b5908b3131585c9945e88cfe815ea Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/309322 Reviewed-by: Raman Tenneti Tested-by: Mike Frysinger --- command.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'command.py') diff --git a/command.py b/command.py index 9b1220dc..8e930299 100644 --- a/command.py +++ b/command.py @@ -43,11 +43,15 @@ class Command(object): """Base class for any command line action in repo. """ - common = False event_log = EventLog() manifest = None _optparse = None + # Whether this command is a "common" one, i.e. whether the user would commonly + # use it or it's a more uncommon command. This is used by the help command to + # show short-vs-full summaries. + COMMON = False + # Whether this command supports running in parallel. If greater than 0, # it is the number of parallel jobs to default to. PARALLEL_JOBS = None -- cgit v1.2.3-54-g00ecf