@task
def gitrepos(branch=None, fork='sympy'):
 with cd('/home/vagrant'):
  if (not exists('sympy-cache.git')):
   error('Run fab vagrant prepare first')
 if (not branch):
  branch = local('git rev-parse --abbrev-ref HEAD', capture=True)
 if (branch == 'master'):
  raise Exception('Cannot release from master')
 run('mkdir -p repos')
 with cd('/home/vagrant/repos'):
  run('git clone --reference ../sympy-cache.git https://github.com/{fork}/sympy.git'.format(fork=fork))
  with cd('/home/vagrant/repos/sympy'):
   run(('git checkout -t origin/%s' % branch))

@ task def gitrepos ( branch = None , fork = 'sympy' ) : with cd ( '/home/vagrant' ) : if ( not exists ( 'sympy-cache.git' ) ) : error ( 'Run fab vagrant prepare first' ) if ( not branch ) : branch = local ( 'git rev-parse --abbrev-ref HEAD' , capture = True ) if ( branch == 'master' ) : raise Exception ( 'Cannot release from master' ) run ( 'mkdir -p repos' ) with cd ( '/home/vagrant/repos' ) : run ( 'git clone --reference ../sympy-cache.git https://github.com/{fork}/sympy.git' . format ( fork = fork ) ) with cd ( '/home/vagrant/repos/sympy' ) : run ( ( 'git checkout -t origin/%s' % branch ) )
clone the repo fab vagrant prepare (namely .