def get_affected_files(allow_limited=True):
 diff_base = None
 if in_travis():
  if in_travis_pr():
   diff_base = travis_branch()
 else:
  diff_base = local_diff_branch()
 if ((diff_base is not None) and allow_limited):
  result = subprocess.check_output(['git', 'diff', '--name-only', diff_base])
  print(('Using files changed relative to %s:' % (diff_base,)))
  print(('-' * 60))
  print(result.rstrip('\n'))
  print(('-' * 60))
 else:
  print('Diff base not specified, listing all files in repository.')
  result = subprocess.check_output(['git', 'ls-files'])
 filenames = [filename for filename in result.rstrip('\n').split('\n') if os.path.exists(filename)]
 return (filenames, diff_base)

def get_affected_files ( allow_limited = True ) : diff_base = None if in_travis ( ) : if in_travis_pr ( ) : diff_base = travis_branch ( ) else : diff_base = local_diff_branch ( ) if ( ( diff_base is not None ) and allow_limited ) : result = subprocess . check_output ( [ 'git' , 'diff' , '--name-only' , diff_base ] ) print ( ( 'Using files changed relative to %s:' % ( diff_base , ) ) ) print ( ( '-' * 60 ) ) print ( result . rstrip ( '\n' ) ) print ( ( '-' * 60 ) ) else : print ( 'Diff base not specified, listing all files in repository.' ) result = subprocess . check_output ( [ 'git' , 'ls-files' ] ) filenames = [ filename for filename in result . rstrip ( '\n' ) . split ( '\n' ) if os . path . exists ( filename ) ] return ( filenames , diff_base )
gets a list of files in the repository .