Mercurial > hg > hg-git
changeset 742:ab8562b11c4f
git_handler: enable thin pack optimization (issue102)
Git makes use thin pack transfer optimization, by default.
Some repository hosting services (like a code.google.com) are require thin pack
optimization.
This patch enables dulwich's thin_packs option by default.
author | Takumi IINO <trot.thunder@gmail.com> |
---|---|
date | Fri, 04 Jul 2014 15:46:49 +0900 |
parents | b61ef156f4b5 |
children | 06f84f38c6dc |
files | hggit/git_handler.py |
diffstat | 1 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/hggit/git_handler.py +++ b/hggit/git_handler.py @@ -1408,7 +1408,7 @@ if port: client.port = port - return transport(host, thin_packs=False, port=port), path + return transport(host, port=port), path httpclient = getattr(client, 'HttpGitClient', None) @@ -1422,14 +1422,14 @@ auth_handler = urllib2.HTTPBasicAuthHandler(url.passwordmgr(self.ui)) opener = urllib2.build_opener(auth_handler) try: - return client.HttpGitClient(uri, opener=opener, thin_packs=False), uri + return client.HttpGitClient(uri, opener=opener), uri except TypeError as e: if e.message.find("unexpected keyword argument 'opener'") >= 0: # using a version of dulwich that doesn't support # http(s) authentication -- try without authentication - return client.HttpGitClient(uri, thin_packs=False), uri + return client.HttpGitClient(uri), uri else: raise # if its not git or git+ssh, try a local url.. - return client.SubprocessGitClient(thin_packs=False), uri + return client.SubprocessGitClient(), uri