Merge "Support filtering by group on forall and list subcmd"
This commit is contained in:
commit
43322283dc
3 changed files with 11 additions and 4 deletions
|
@ -120,6 +120,9 @@ without iterating through the remaining projects.
|
|||
p.add_option('-r', '--regex',
|
||||
dest='regex', action='store_true',
|
||||
help="Execute the command only on projects matching regex or wildcard expression")
|
||||
p.add_option('-g', '--groups',
|
||||
dest='groups',
|
||||
help="Execute the command only on projects matching the specified groups")
|
||||
p.add_option('-c', '--command',
|
||||
help='Command (and arguments) to execute',
|
||||
dest='command',
|
||||
|
@ -213,7 +216,7 @@ without iterating through the remaining projects.
|
|||
self.manifest.Override(smart_sync_manifest_path)
|
||||
|
||||
if not opt.regex:
|
||||
projects = self.GetProjects(args)
|
||||
projects = self.GetProjects(args, groups=opt.groups)
|
||||
else:
|
||||
projects = self.FindProjects(args)
|
||||
|
||||
|
|
|
@ -35,6 +35,9 @@ This is similar to running: repo forall -c 'echo "$REPO_PATH : $REPO_PROJECT"'.
|
|||
p.add_option('-r', '--regex',
|
||||
dest='regex', action='store_true',
|
||||
help="Filter the project list based on regex or wildcard matching of strings")
|
||||
p.add_option('-g', '--groups',
|
||||
dest='groups',
|
||||
help="Filter the project list based on the groups the project is in")
|
||||
p.add_option('-f', '--fullpath',
|
||||
dest='fullpath', action='store_true',
|
||||
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"'.
|
|||
sys.exit(1)
|
||||
|
||||
if not opt.regex:
|
||||
projects = self.GetProjects(args)
|
||||
projects = self.GetProjects(args, groups=opt.groups)
|
||||
else:
|
||||
projects = self.FindProjects(args)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue