Update changelog
This commit is contained in:
		
							
								
								
									
										46
									
								
								README.rst
									
									
									
									
									
								
							
							
						
						
									
										46
									
								
								README.rst
									
									
									
									
									
								
							| @@ -25,6 +25,52 @@ How to install | |||||||
| Changelog | Changelog | ||||||
| ============== | ============== | ||||||
|  |  | ||||||
|  | 0.23.2 (2015-1X-XX) | ||||||
|  | ------------------------- | ||||||
|  |  | ||||||
|  | - Unify callbacks system for remotes and clone | ||||||
|  |   `#568 <https://github.com/libgit2/pygit2/pull/568>`_ | ||||||
|  |  | ||||||
|  | - New ``TreeEntry._name`` | ||||||
|  |   `#570 <https://github.com/libgit2/pygit2/pull/570>`_ | ||||||
|  |  | ||||||
|  | - Fix segfault in ``Tag._message`` | ||||||
|  |   `#572 <https://github.com/libgit2/pygit2/pull/572>`_ | ||||||
|  |  | ||||||
|  | - Documentation improvements | ||||||
|  |   `#569 <https://github.com/libgit2/pygit2/pull/569>`_ | ||||||
|  |   `#574 <https://github.com/libgit2/pygit2/pull/574>`_ | ||||||
|  |  | ||||||
|  | API changes to clone:: | ||||||
|  |  | ||||||
|  |   # Before | ||||||
|  |   clone_repository(..., credentials, certificate) | ||||||
|  |  | ||||||
|  |   # Now | ||||||
|  |   callbacks = RemoteCallbacks(credentials, certificate) | ||||||
|  |   clone_repository(..., callbacks) | ||||||
|  |  | ||||||
|  | API changes to remote:: | ||||||
|  |  | ||||||
|  |   # Before | ||||||
|  |   def transfer_progress(stats): | ||||||
|  |       ... | ||||||
|  |  | ||||||
|  |   remote.credentials = credentials | ||||||
|  |   remote.transfer_progress = transfer_progress | ||||||
|  |   remote.fetch() | ||||||
|  |   remote.push(specs) | ||||||
|  |  | ||||||
|  |   # Now | ||||||
|  |   class MyCallbacks(RemoteCallbacks): | ||||||
|  |       def transfer_progress(self, stats): | ||||||
|  |           ... | ||||||
|  |  | ||||||
|  |   callbacks = MyCallbacks(credentials) | ||||||
|  |   remote.fetch(callbacks=callbacks) | ||||||
|  |   remote.push(specs, callbacks=callbacks) | ||||||
|  |  | ||||||
|  |  | ||||||
| 0.23.1 (2015-09-26) | 0.23.1 (2015-09-26) | ||||||
| ------------------------- | ------------------------- | ||||||
|  |  | ||||||
|   | |||||||
| @@ -16,9 +16,11 @@ Requirements | |||||||
| - Python 2.7, 3.2+ or PyPy 2.6+ (including the development headers) | - Python 2.7, 3.2+ or PyPy 2.6+ (including the development headers) | ||||||
| - Libgit2 v0.23.x | - Libgit2 v0.23.x | ||||||
| - cffi 1.0+ | - cffi 1.0+ | ||||||
| - OpenSSL development headers, optional, used for HTTPS network operations. |  | ||||||
| - Libssh2, optional, used for SSH network operations. | Optional libgit2 dependecies to support ssh and https: | ||||||
| - pkg-config, optional, used for SSH network operations. |  | ||||||
|  | - https: WinHTTP (Windows), SecureTransport (OS X) or OpenSSL. | ||||||
|  | - ssh: libssh2, pkg-config | ||||||
|  |  | ||||||
| It should work with older versions of cffi and PyPy, but using cffi 1.0+ | It should work with older versions of cffi and PyPy, but using cffi 1.0+ | ||||||
| (and PyPy 2.6+) is strongly encouraged. | (and PyPy 2.6+) is strongly encouraged. | ||||||
|   | |||||||
| @@ -355,7 +355,7 @@ class Remote(object): | |||||||
|         err = C.git_remote_save(self._remote) |         err = C.git_remote_save(self._remote) | ||||||
|         check_error(err) |         check_error(err) | ||||||
|  |  | ||||||
|     def fetch(self, refspecs=None, callbacks=None, message=None): |     def fetch(self, refspecs=None, message=None, callbacks=None): | ||||||
|         """Perform a fetch against this remote. Returns a <TransferProgress> |         """Perform a fetch against this remote. Returns a <TransferProgress> | ||||||
|         object. |         object. | ||||||
|         """ |         """ | ||||||
|   | |||||||
| @@ -71,32 +71,36 @@ class CredentialCreateTest(utils.NoRepoTestCase): | |||||||
| class CredentialCallback(utils.RepoTestCase): | class CredentialCallback(utils.RepoTestCase): | ||||||
|     def test_callback(self): |     def test_callback(self): | ||||||
|         class MyCallbacks(pygit2.RemoteCallbacks): |         class MyCallbacks(pygit2.RemoteCallbacks): | ||||||
|  |             @staticmethod | ||||||
|             def credentials(url, username, allowed): |             def credentials(url, username, allowed): | ||||||
|                 self.assertTrue(allowed & GIT_CREDTYPE_USERPASS_PLAINTEXT) |                 self.assertTrue(allowed & GIT_CREDTYPE_USERPASS_PLAINTEXT) | ||||||
|                 raise Exception("I don't know the password") |                 raise Exception("I don't know the password") | ||||||
|  |  | ||||||
|         remote = self.repo.create_remote("github", "https://github.com/github/github") |         url = "https://github.com/github/github" | ||||||
|  |         remote = self.repo.create_remote("github", url) | ||||||
|  |  | ||||||
|         self.assertRaises(Exception, lambda: remote.fetch(callbacks=MyCallbacks())) |         self.assertRaises(Exception, lambda: remote.fetch(callbacks=MyCallbacks())) | ||||||
|  |  | ||||||
|     def test_bad_cred_type(self): |     def test_bad_cred_type(self): | ||||||
|         class MyCallbacks(pygit2.RemoteCallbacks): |         class MyCallbacks(pygit2.RemoteCallbacks): | ||||||
|  |             @staticmethod | ||||||
|             def credentials(url, username, allowed): |             def credentials(url, username, allowed): | ||||||
|                 self.assertTrue(allowed & GIT_CREDTYPE_USERPASS_PLAINTEXT) |                 self.assertTrue(allowed & GIT_CREDTYPE_USERPASS_PLAINTEXT) | ||||||
|                 return Keypair("git", "foo.pub", "foo", "sekkrit") |                 return Keypair("git", "foo.pub", "foo", "sekkrit") | ||||||
|  |  | ||||||
|         remote = self.repo.create_remote("github", "https://github.com/github/github") |         url = "https://github.com/github/github" | ||||||
|  |         remote = self.repo.create_remote("github", url) | ||||||
|         self.assertRaises(TypeError, lambda: remote.fetch(callbacks=MyCallbacks())) |         self.assertRaises(TypeError, lambda: remote.fetch(callbacks=MyCallbacks())) | ||||||
|  |  | ||||||
| class CallableCredentialTest(utils.RepoTestCase): | class CallableCredentialTest(utils.RepoTestCase): | ||||||
|  |  | ||||||
|     def test_user_pass(self): |     def test_user_pass(self): | ||||||
|         class MyCallbacks(pygit2.RemoteCallbacks): |         credentials = UserPass("libgit2", "libgit2") | ||||||
|             def __init__(self): |         callbacks = pygit2.RemoteCallbacks(credentials=credentials) | ||||||
|                 self.credentials = UserPass("libgit2", "libgit2") |  | ||||||
|  |  | ||||||
|         remote = self.repo.create_remote("bb", "https://bitbucket.org/libgit2/testgitrepository.git") |         url = "https://bitbucket.org/libgit2/testgitrepository.git" | ||||||
|         remote.fetch(callbacks=MyCallbacks()) |         remote = self.repo.create_remote("bb", url) | ||||||
|  |         remote.fetch(callbacks=callbacks) | ||||||
|  |  | ||||||
| if __name__ == '__main__': | if __name__ == '__main__': | ||||||
|     unittest.main() |     unittest.main() | ||||||
|   | |||||||
| @@ -212,7 +212,6 @@ class EmptyRepositoryTest(utils.EmptyRepoTestCase): | |||||||
|         self.assertEqual(stats.received_objects, REMOTE_REPO_OBJECTS) |         self.assertEqual(stats.received_objects, REMOTE_REPO_OBJECTS) | ||||||
|  |  | ||||||
|     def test_transfer_progress(self): |     def test_transfer_progress(self): | ||||||
|         self.tp = None |  | ||||||
|         class MyCallbacks(pygit2.RemoteCallbacks): |         class MyCallbacks(pygit2.RemoteCallbacks): | ||||||
|             def transfer_progress(self, stats): |             def transfer_progress(self, stats): | ||||||
|                 self.tp = stats |                 self.tp = stats | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 J. David Ibáñez
					J. David Ibáñez