~ronny-pfannschmidt-deactivatedaccount/dulwich/pypy

« back to all changes in this revision

Viewing changes to dulwich/client.py

  • Committer: Jelmer Vernooij
  • Date: 2011-09-20 12:04:55 UTC
  • Revision ID: git-v1:d4fc20d1855a9a7f4145d51e69455f8e56a7084e
Fix handling of slashes in the http client.

Show diffs side-by-side

added added

removed removed

Lines of Context:
578
578
        self.dumb = dumb
579
579
        GitClient.__init__(self, *args, **kwargs)
580
580
 
 
581
    def _get_url(self, path):
 
582
        return urlparse.urljoin(self.base_url, path).rstrip("/") + "/"
 
583
 
581
584
    def _perform(self, req):
582
585
        """Perform a HTTP request.
583
586
 
642
645
        :raises UpdateRefsError: if the server supports report-status
643
646
                                 and rejects ref updates
644
647
        """
645
 
        url = urlparse.urljoin(self.base_url, path)
646
 
        old_refs, server_capabilities = self._discover_references("git-receive-pack", url)
 
648
        url = self._get_url(path)
 
649
        old_refs, server_capabilities = self._discover_references(
 
650
            "git-receive-pack", url)
647
651
        negotiated_capabilities = list(self._send_capabilities)
648
652
        new_refs = determine_wants(old_refs)
649
653
        if not new_refs:
674
678
        :param pack_data: Callback called for each bit of data in the pack
675
679
        :param progress: Callback for progress reports (strings)
676
680
        """
677
 
        url = urlparse.urljoin(self.base_url, path)
 
681
        url = self._get_url(path)
678
682
        refs, server_capabilities = self._discover_references(
679
683
            "git-upload-pack", url)
680
684
        negotiated_capabilities = list(server_capabilities)