#NEWLINE# def get_git_projects( self , groups = None , ignore_missing_groups = True ) : #NEWLINE# #INDENT# ' Get the git projects matching a given group ' #NEWLINE# if ( not groups ) : #NEWLINE# #INDENT# return self . git_projects #NEWLINE# #UNINDENT# res = set ( ) #NEWLINE# git_project_names = dict ( ) #NEWLINE# group_names = groups #NEWLINE# for git_project in self . git_projects : #NEWLINE# #INDENT# git_project_names [ git_project . name ] = git_project #NEWLINE# #UNINDENT# projects = list ( ) #NEWLINE# groups = qisrc . groups . get_groups ( self . worktree ) #NEWLINE# for group_name in group_names : #NEWLINE# #INDENT# warn_for_group = True #NEWLINE# try : #NEWLINE# #INDENT# project_names = groups . projects ( group_name ) #NEWLINE# #UNINDENT# except qisrc . groups . NoSuchGroup : #NEWLINE# #INDENT# if ignore_missing_groups : #NEWLINE# #INDENT# project_names = list ( ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# raise #NEWLINE# #UNINDENT# #UNINDENT# for project_name in project_names : #NEWLINE# #INDENT# git_project = git_project_names . get ( project_name ) #NEWLINE# if git_project : #NEWLINE# #INDENT# res . add ( git_project ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if warn_for_group : #NEWLINE# #INDENT# ui . warning ( 'Group' , group_name , 'is not currently in use\n' , ( 'Please use `qisrc add-group %s`' % group_name ) ) #NEWLINE# warn_for_group = False #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# res = list ( project_names ) #NEWLINE# res . sort ( key = operator . attrgetter ( 'src' ) ) #NEWLINE# return res