summaryrefslogtreecommitdiffstats
path: root/subcmds/help.py
diff options
context:
space:
mode:
authorShawn O. Pearce <sop@google.com>2009-03-03 17:47:06 -0800
committerShawn O. Pearce <sop@google.com>2009-03-03 17:47:06 -0800
commitc95583bf4f17b8467f815b6391ffc6c7add08804 (patch)
treec69bf8a061279b79326fb00f2197efcd8726864c /subcmds/help.py
parent6a5644d392069b67f17c8ce6cb10f07cce71cc1c (diff)
downloadgit-repo-c95583bf4f17b8467f815b6391ffc6c7add08804.tar.gz
Don't permit users to run repo status in a mirror client
If a client was created with "repo init --mirror" then there are no working directories present, and no files checked out. Using a command like "repo status" in this context makes no sense, and actually throws back a Pytyon traceback at the console when the underlying commands fail out. We now tag commands with the MirrorSafeCommand type if they are able to be executed within a mirror directory safely. Using a command in a mirror which lacks this base class results in a useful error letting you know the command isn't supported. Bug: REPO-14 Signed-off-by: Shawn O. Pearce <sop@google.com>
Diffstat (limited to 'subcmds/help.py')
-rw-r--r--subcmds/help.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/subcmds/help.py b/subcmds/help.py
index 6e0238a0..a2814e11 100644
--- a/subcmds/help.py
+++ b/subcmds/help.py
@@ -17,9 +17,9 @@ import sys
17from formatter import AbstractFormatter, DumbWriter 17from formatter import AbstractFormatter, DumbWriter
18 18
19from color import Coloring 19from color import Coloring
20from command import PagedCommand 20from command import PagedCommand, MirrorSafeCommand
21 21
22class Help(PagedCommand): 22class Help(PagedCommand, MirrorSafeCommand):
23 common = False 23 common = False
24 helpSummary = "Display detailed help on a command" 24 helpSummary = "Display detailed help on a command"
25 helpUsage = """ 25 helpUsage = """