def vcs_upload():
 if (env.deploy_tool == u'git'):
  remote_path = (u'ssh://%s@%s%s' % (env.user, env.host_string, env.repo_path))
  if (not exists(env.repo_path)):
   run((u'mkdir -p %s' % env.repo_path))
   with cd(env.repo_path):
    run(u'git init --bare')
  local((u'git push -f %s master' % remote_path))
  with cd(env.repo_path):
   run((u'GIT_WORK_TREE=%s git checkout -f master' % env.proj_path))
   run((u'GIT_WORK_TREE=%s git reset --hard' % env.proj_path))
 elif (env.deploy_tool == u'hg'):
  remote_path = (u'ssh://%s@%s/%s' % (env.user, env.host_string, env.repo_path))
  with cd(env.repo_path):
   if (not exists((u'%s/.hg' % env.repo_path))):
    run(u'hg init')
    print(env.repo_path)
   with fab_settings(warn_only=True):
    push = local((u'hg push -f %s' % remote_path))
    if (push.return_code == 255):
     abort()
   run(u'hg update')

def vcs_upload ( ) : if ( env . deploy_tool == u'git' ) : remote_path = ( u'ssh://%s@%s%s' % ( env . user , env . host_string , env . repo_path ) ) if ( not exists ( env . repo_path ) ) : run ( ( u'mkdir -p %s' % env . repo_path ) ) with cd ( env . repo_path ) : run ( u'git init --bare' ) local ( ( u'git push -f %s master' % remote_path ) ) with cd ( env . repo_path ) : run ( ( u'GIT_WORK_TREE=%s git checkout -f master' % env . proj_path ) ) run ( ( u'GIT_WORK_TREE=%s git reset --hard' % env . proj_path ) ) elif ( env . deploy_tool == u'hg' ) : remote_path = ( u'ssh://%s@%s/%s' % ( env . user , env . host_string , env . repo_path ) ) with cd ( env . repo_path ) : if ( not exists ( ( u'%s/.hg' % env . repo_path ) ) ) : run ( u'hg init' ) print ( env . repo_path ) with fab_settings ( warn_only = True ) : push = local ( ( u'hg push -f %s' % remote_path ) ) if ( push . return_code == 255 ) : abort ( ) run ( u'hg update' )
uploads the project with the selected vcs tool .