(branch=None, fork='sympy')
Clone the repo

    fab vagrant prepare (namely, checkout_cache()) must be run first. By
    default, the branch checked out is the same one as the one checked out
    locally. The master branch is not allowed--use a release branch (see the
    README). No naming convention is put on the release branch.

    To test the release, create a branch in your fork, and set the fork
    option.
Clone the repo
Clone the repo
def gitrepos(branch=None, fork='sympy'):
    """
    Clone the repo

    fab vagrant prepare (namely, checkout_cache()) must be run first. By
    default, the branch checked out is the same one as the one checked out
    locally. The master branch is not allowed--use a release branch (see the
    README). No naming convention is put on the release branch.

    To test the release, create a branch in your fork, and set the fork
    option.
    """
    with cd("/home/vagrant"):
        if not exists("sympy-cache.git"):
            error("Run fab vagrant prepare first")
    if not branch:
        # Use the current branch (of this git repo, not the one in Vagrant)
        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)
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 : # Use the current branch (of this git repo, not the one in Vagrant) 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 )