Skip to content

Conversation

tclh123
Copy link
Owner

@tclh123 tclh123 commented Nov 24, 2013

No description provided.

xtao and others added 30 commits May 20, 2013 16:43
Update libgit2 repo url to code.
Add additions and deletions for patch.
Conflicts:
	setup.py
	src/pygit2.c
	src/remote.c
	src/repository.c
	src/tree.c
	test/test_config.py
	test/test_remote.py
	test/test_repository.py
xtao and others added 30 commits August 16, 2013 16:09
When overriding the tear-down function, we must remember to call the
parent's function or we won't clean up the temporary directory for the
test.
The current hierarchy of test cases that create and blow away test
repositories in the ``setUp`` and ``tearDown`` methods is inadequate
for testing scenarios where multiple repositories must be edited,
e.g.  testing push.

Extract the temporary repository behaviour into a context manager
class ``TemporaryRepository`` which can be used via the ``with``
keyword.  The context manager's ``__enter__` method returns creates
the specified repository in a temporary directory and returns its
path.  The temporary directory is removed in ``__exit__``.

Update the existing test case base classes to use the context
manager and invoke ``__enter__`` and ``__exit__`` in the ``setUp``
and ``tearDown`` methods respectively.

Finally, make some small tweaks to a handful of tests to get them
working under this new system.
Implement push support via Remote.push which is called with a single
refspec and raises GitError (with an appropriate message where
possible) if the push fails.

Note that local push to non-bare repository is currently not
supported by libgit2.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants