def already_backported(branch, since_tag=None):
 if (since_tag is None):
  since_tag = check_output(['git', 'describe', branch, '--abbrev=0']).decode('utf8').strip()
 cmd = ['git', 'log', ('%s..%s' % (since_tag, branch)), '--oneline']
 lines = check_output(cmd).decode('utf8')
 return set((int(num) for num in backport_re.findall(lines)))

def already_backported ( branch , since_tag = None ) : if ( since_tag is None ) : since_tag = check_output ( [ 'git' , 'describe' , branch , '--abbrev=0' ] ) . decode ( 'utf8' ) . strip ( ) cmd = [ 'git' , 'log' , ( '%s..%s' % ( since_tag , branch ) ) , '--oneline' ] lines = check_output ( cmd ) . decode ( 'utf8' ) return set ( ( int ( num ) for num in backport_re . findall ( lines ) ) )
return set of prs that have been backported already .