diff options
| author | David Pursehouse <david.pursehouse@sonymobile.com> | 2015-08-05 01:01:02 +0000 |
|---|---|---|
| committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2015-08-05 01:01:02 +0000 |
| commit | 43322283dc97b12e6d5b03c27fb780b0110f889a (patch) | |
| tree | d34bfa5366fffa045f8d82158b19a5add4c588b9 /subcmds/list.py | |
| parent | 7e59de2bcc8513ba28701062be2637d90cb6eeff (diff) | |
| parent | 0369a069ade1602879c16dd33dc592bed3f17c0f (diff) | |
| download | git-repo-43322283dc97b12e6d5b03c27fb780b0110f889a.tar.gz | |
Merge "Support filtering by group on forall and list subcmd"
Diffstat (limited to 'subcmds/list.py')
| -rw-r--r-- | subcmds/list.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/subcmds/list.py b/subcmds/list.py index 945c28d8..ca51c5f7 100644 --- a/subcmds/list.py +++ b/subcmds/list.py | |||
| @@ -35,6 +35,9 @@ This is similar to running: repo forall -c 'echo "$REPO_PATH : $REPO_PROJECT"'. | |||
| 35 | p.add_option('-r', '--regex', | 35 | p.add_option('-r', '--regex', |
| 36 | dest='regex', action='store_true', | 36 | dest='regex', action='store_true', |
| 37 | help="Filter the project list based on regex or wildcard matching of strings") | 37 | help="Filter the project list based on regex or wildcard matching of strings") |
| 38 | p.add_option('-g', '--groups', | ||
| 39 | dest='groups', | ||
| 40 | help="Filter the project list based on the groups the project is in") | ||
| 38 | p.add_option('-f', '--fullpath', | 41 | p.add_option('-f', '--fullpath', |
| 39 | dest='fullpath', action='store_true', | 42 | dest='fullpath', action='store_true', |
| 40 | help="Display the full work tree path instead of the relative path") | 43 | help="Display the full work tree path instead of the relative path") |
| @@ -62,7 +65,7 @@ This is similar to running: repo forall -c 'echo "$REPO_PATH : $REPO_PROJECT"'. | |||
| 62 | sys.exit(1) | 65 | sys.exit(1) |
| 63 | 66 | ||
| 64 | if not opt.regex: | 67 | if not opt.regex: |
| 65 | projects = self.GetProjects(args) | 68 | projects = self.GetProjects(args, groups=opt.groups) |
| 66 | else: | 69 | else: |
| 67 | projects = self.FindProjects(args) | 70 | projects = self.FindProjects(args) |
| 68 | 71 | ||
