def repo_run_command(repo, cmd, ignore_status=False, cd=True):
 os_dep.command('ssh')
 repo = repo.strip()
 run_cmd = None
 cd_str = ''
 if repo.startswith('ssh://'):
  username = None
  (hostline, remote_path) = parse_ssh_path(repo)
  if cd:
   cd_str = ('cd %s && ' % remote_path)
  if ('@' in hostline):
   (username, host) = hostline.split('@')
   run_cmd = ('ssh %s@%s "%s%s"' % (username, host, cd_str, cmd))
  else:
   run_cmd = ('ssh %s "%s%s"' % (hostline, cd_str, cmd))
 else:
  if cd:
   cd_str = ('cd %s && ' % repo)
  run_cmd = ('%s%s' % (cd_str, cmd))
 if run_cmd:
  return utils.run(run_cmd, ignore_status=ignore_status)

def repo_run_command ( repo , cmd , ignore_status = False , cd = True ) : os_dep . command ( 'ssh' ) repo = repo . strip ( ) run_cmd = None cd_str = '' if repo . startswith ( 'ssh://' ) : username = None ( hostline , remote_path ) = parse_ssh_path ( repo ) if cd : cd_str = ( 'cd %s && ' % remote_path ) if ( '@' in hostline ) : ( username , host ) = hostline . split ( '@' ) run_cmd = ( 'ssh %s@%s "%s%s"' % ( username , host , cd_str , cmd ) ) else : run_cmd = ( 'ssh %s "%s%s"' % ( hostline , cd_str , cmd ) ) else : if cd : cd_str = ( 'cd %s && ' % repo ) run_cmd = ( '%s%s' % ( cd_str , cmd ) ) if run_cmd : return utils . run ( run_cmd , ignore_status = ignore_status )
run a command relative to the repo path this is basically a utils .