def test_checkout_default(tmpdir): """ checkout operation should succeed, and point to the latest revision""" remote = setup_hg_repo(tmpdir.path, 'remote') output = setup_hg_repo(tmpdir.path) set_hg_repo_path(output, remote) checkout.checkout(output, remote) eq_(checkout.revision(output), '176e98c1d359')
def test_checkout_revision(tmpdir): """ checkout operation should succeed and point to some revision""" remote = setup_hg_repo(tmpdir.path, 'remote') output = setup_hg_repo(tmpdir.path) set_hg_repo_path(output, remote) checkout.checkout(output, remote, head_rev='123df26ca0f5') eq_(checkout.revision(output), '123df26ca0f5')
def test_invalid_revision(tmpdir): """ get a revision from an invalid repo""" eq_(checkout.revision(tmpdir.path), None)