Comment the remote test that segfaults

See libgit2/libgit2#1692

To uncomment whenever libgit2 0.20 is released
This commit is contained in:
J. David Ibáñez
2013-07-05 23:23:31 +02:00
parent e56e8600ac
commit 534d98b6b2
3 changed files with 23 additions and 24 deletions

View File

@@ -137,21 +137,19 @@ clone_repository(PyObject *self, PyObject *args) {
const char *remote_name, *push_url, *fetch_spec;
const char *push_spec, *checkout_branch;
int err;
git_clone_options opts = GIT_CLONE_OPTIONS_INIT;
if (!PyArg_ParseTuple(args, "zzIzzzzz",
&url, &path, &bare, &remote_name, &push_url,
&fetch_spec, &push_spec, &checkout_branch))
return NULL;
git_clone_options opts = {
.version=1,
.bare=bare,
.remote_name=remote_name,
.pushurl=push_url,
.fetch_spec=fetch_spec,
.push_spec=push_spec,
.checkout_branch=checkout_branch
};
opts.bare = bare;
opts.remote_name = remote_name;
opts.pushurl = push_url;
opts.fetch_spec = fetch_spec;
opts.push_spec = push_spec;
opts.checkout_branch = checkout_branch;
err = git_clone(&repo, url, path, &opts);
if (err < 0)

View File

@@ -85,8 +85,9 @@ class RepositoryTest(utils.RepoTestCase):
# new_fetchspec = ('refs/foo/*', 'refs/remotes/foo/*')
# remote.fetchspec = new_fetchspec
# self.assertEqual(new_fetchspec[0], remote.fetchspec[0])
# self.assertEqual(new_fetchspec[1], remote.fetchspec[1])
# refspec = remote.get_refspec(0)
# self.assertEqual(new_fetchspec[0], refspec[0])
# self.assertEqual(new_fetchspec[1], refspec[1])
def test_remote_list(self):
@@ -100,6 +101,7 @@ class RepositoryTest(utils.RepoTestCase):
remote = self.repo.create_remote(name, url)
self.assertTrue(remote.name in [x.name for x in self.repo.remotes])
def test_remote_save(self):
remote = self.repo.remotes[0]

View File

@@ -331,10 +331,11 @@ class CloneRepositoryTest(utils.NoRepoTestCase):
def test_clone_fetch_spec(self):
repo_path = "./test/data/testrepo.git/"
repo = clone_repository(
repo_path, self._temp_dir, fetch_spec="refs/heads/test"
)
self.assertFalse(repo.is_empty)
## FIXME Uncomment these lines once libgit2 0.20 is released
## repo = clone_repository(repo_path, self._temp_dir,
## fetch_spec="refs/heads/test")
## self.assertFalse(repo.is_empty)
# FIXME: When pygit2 retrieve the fetchspec we passed to git clone.
# fetchspec seems to be going through, but the Repository class is
# not getting it.
@@ -342,9 +343,8 @@ class CloneRepositoryTest(utils.NoRepoTestCase):
def test_clone_push_spec(self):
repo_path = "./test/data/testrepo.git/"
repo = clone_repository(
repo_path, self._temp_dir, push_spec="refs/heads/test"
)
repo = clone_repository(repo_path, self._temp_dir,
push_spec="refs/heads/test")
self.assertFalse(repo.is_empty)
# FIXME: When pygit2 supports retrieving the pushspec parameter,
# enable this test
@@ -353,9 +353,8 @@ class CloneRepositoryTest(utils.NoRepoTestCase):
def test_clone_checkout_branch(self):
repo_path = "./test/data/testrepo.git/"
repo = clone_repository(
repo_path, self._temp_dir, checkout_branch="test"
)
repo = clone_repository(repo_path, self._temp_dir,
checkout_branch="test")
self.assertFalse(repo.is_empty)
# FIXME: When pygit2 supports retrieving the current branch,
# enable this test