summaryrefslogtreecommitdiffstats
path: root/subcmds/overview.py
diff options
context:
space:
mode:
Diffstat (limited to 'subcmds/overview.py')
-rw-r--r--subcmds/overview.py20
1 files changed, 13 insertions, 7 deletions
diff --git a/subcmds/overview.py b/subcmds/overview.py
index 08b58a6c..63f5a79e 100644
--- a/subcmds/overview.py
+++ b/subcmds/overview.py
@@ -1,5 +1,3 @@
1# -*- coding:utf-8 -*-
2#
3# Copyright (C) 2012 The Android Open Source Project 1# Copyright (C) 2012 The Android Open Source Project
4# 2#
5# Licensed under the Apache License, Version 2.0 (the "License"); 3# Licensed under the Apache License, Version 2.0 (the "License");
@@ -14,13 +12,14 @@
14# See the License for the specific language governing permissions and 12# See the License for the specific language governing permissions and
15# limitations under the License. 13# limitations under the License.
16 14
17from __future__ import print_function 15import optparse
16
18from color import Coloring 17from color import Coloring
19from command import PagedCommand 18from command import PagedCommand
20 19
21 20
22class Overview(PagedCommand): 21class Overview(PagedCommand):
23 common = True 22 COMMON = True
24 helpSummary = "Display overview of unmerged project branches" 23 helpSummary = "Display overview of unmerged project branches"
25 helpUsage = """ 24 helpUsage = """
26%prog [--current-branch] [<project>...] 25%prog [--current-branch] [<project>...]
@@ -29,15 +28,22 @@ class Overview(PagedCommand):
29The '%prog' command is used to display an overview of the projects branches, 28The '%prog' command is used to display an overview of the projects branches,
30and list any local commits that have not yet been merged into the project. 29and list any local commits that have not yet been merged into the project.
31 30
32The -b/--current-branch option can be used to restrict the output to only 31The -c/--current-branch option can be used to restrict the output to only
33branches currently checked out in each project. By default, all branches 32branches currently checked out in each project. By default, all branches
34are displayed. 33are displayed.
35""" 34"""
36 35
37 def _Options(self, p): 36 def _Options(self, p):
38 p.add_option('-b', '--current-branch', 37 p.add_option('-c', '--current-branch',
39 dest="current_branch", action="store_true", 38 dest="current_branch", action="store_true",
40 help="Consider only checked out branches") 39 help="consider only checked out branches")
40 p.add_option('--no-current-branch',
41 dest='current_branch', action='store_false',
42 help='consider all local branches')
43 # Turn this into a warning & remove this someday.
44 p.add_option('-b',
45 dest='current_branch', action='store_true',
46 help=optparse.SUPPRESS_HELP)
41 47
42 def Execute(self, opt, args): 48 def Execute(self, opt, args):
43 all_branches = [] 49 all_branches = []