diff options
Diffstat (limited to 'subcmds/info.py')
-rw-r--r-- | subcmds/info.py | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/subcmds/info.py b/subcmds/info.py index 6381fa8e..6c1246ef 100644 --- a/subcmds/info.py +++ b/subcmds/info.py | |||
@@ -12,6 +12,8 @@ | |||
12 | # See the License for the specific language governing permissions and | 12 | # See the License for the specific language governing permissions and |
13 | # limitations under the License. | 13 | # limitations under the License. |
14 | 14 | ||
15 | import optparse | ||
16 | |||
15 | from command import PagedCommand | 17 | from command import PagedCommand |
16 | from color import Coloring | 18 | from color import Coloring |
17 | from git_refs import R_M, R_HEADS | 19 | from git_refs import R_M, R_HEADS |
@@ -23,9 +25,9 @@ class _Coloring(Coloring): | |||
23 | 25 | ||
24 | 26 | ||
25 | class Info(PagedCommand): | 27 | class Info(PagedCommand): |
26 | common = True | 28 | COMMON = True |
27 | helpSummary = "Get info on the manifest branch, current branch or unmerged branches" | 29 | helpSummary = "Get info on the manifest branch, current branch or unmerged branches" |
28 | helpUsage = "%prog [-dl] [-o [-b]] [<project>...]" | 30 | helpUsage = "%prog [-dl] [-o [-c]] [<project>...]" |
29 | 31 | ||
30 | def _Options(self, p): | 32 | def _Options(self, p): |
31 | p.add_option('-d', '--diff', | 33 | p.add_option('-d', '--diff', |
@@ -34,12 +36,19 @@ class Info(PagedCommand): | |||
34 | p.add_option('-o', '--overview', | 36 | p.add_option('-o', '--overview', |
35 | dest='overview', action='store_true', | 37 | dest='overview', action='store_true', |
36 | help='show overview of all local commits') | 38 | help='show overview of all local commits') |
37 | p.add_option('-b', '--current-branch', | 39 | p.add_option('-c', '--current-branch', |
38 | dest="current_branch", action="store_true", | 40 | dest="current_branch", action="store_true", |
39 | help="consider only checked out branches") | 41 | help="consider only checked out branches") |
42 | p.add_option('--no-current-branch', | ||
43 | dest='current_branch', action='store_false', | ||
44 | help='consider all local branches') | ||
45 | # Turn this into a warning & remove this someday. | ||
46 | p.add_option('-b', | ||
47 | dest='current_branch', action='store_true', | ||
48 | help=optparse.SUPPRESS_HELP) | ||
40 | p.add_option('-l', '--local-only', | 49 | p.add_option('-l', '--local-only', |
41 | dest="local", action="store_true", | 50 | dest="local", action="store_true", |
42 | help="Disable all remote operations") | 51 | help="disable all remote operations") |
43 | 52 | ||
44 | def Execute(self, opt, args): | 53 | def Execute(self, opt, args): |
45 | self.out = _Coloring(self.client.globalConfig) | 54 | self.out = _Coloring(self.client.globalConfig) |