#NEWLINE# def get_branch_choices( self , repo , kind ) : #NEWLINE# #INDENT# lines = self . git_flow_lines ( [ kind ] , cwd = repo ) #NEWLINE# ( branches , choices ) = ( [ ] , [ ] ) #NEWLINE# lines = [ l for l in lines if l . strip ( ) ] #NEWLINE# for l in sorted ( lines , key = ( lambda x : ( ( 0 if ( x [ 0 ] == '*' ) else 1 ) , x [ 2 : ] ) ) ) : #NEWLINE# #INDENT# current = l [ 0 : 2 ] #NEWLINE# name = l [ 2 : ] #NEWLINE# choices . append ( [ ( '%s%s' % ( repo , name . strip ( ) ) ) ] ) #NEWLINE# branches . append ( name ) #NEWLINE# #UNINDENT# return ( branches , choices )