~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/transport/http/__init__.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2011-08-17 18:13:57 UTC
  • mfrom: (5268.7.29 transport-segments)
  • Revision ID: pqm@pqm.ubuntu.com-20110817181357-y5q5eth1hk8bl3om
(jelmer) Allow specifying the colocated branch to use in the branch URL,
 and retrieving the branch name using ControlDir._get_selected_branch.
 (Jelmer Vernooij)

Show diffs side-by-side

added added

removed removed

Lines of Context:
148
148
 
149
149
        user and passwords are not embedded in the path provided to the server.
150
150
        """
151
 
        path = self._parsed_url.clone(relpath).path
152
 
        return self._unsplit_url(self._unqualified_scheme,
153
 
                                 None, None, self._parsed_url.host,
154
 
                                 self._parsed_url.port, path)
 
151
        url = self._parsed_url.clone(relpath)
 
152
        url.user = url.quoted_user = None
 
153
        url.password = url.quoted_password = None
 
154
        url.scheme = self._unqualified_scheme
 
155
        return str(url)
155
156
 
156
157
    def _create_auth(self):
157
158
        """Returns a dict containing the credentials provided at build time."""
412
413
        """See bzrlib.transport.Transport.external_url."""
413
414
        # HTTP URL's are externally usable as long as they don't mention their
414
415
        # implementation qualifier
415
 
        return self._unsplit_url(self._unqualified_scheme,
416
 
                                 self._parsed_url.user, self._parsed_url.password,
417
 
                                 self._parsed_url.host, self._parsed_url.port,
418
 
                                 self._parsed_url.path)
 
416
        url = self._parsed_url.clone()
 
417
        url.scheme = self._unqualified_scheme
 
418
        return str(url)
419
419
 
420
420
    def is_readonly(self):
421
421
        """See Transport.is_readonly."""
538
538
        new_transport = None
539
539
        parsed_url = self._split_url(target)
540
540
        # Recalculate base path. This is needed to ensure that when the
541
 
        # redirected tranport will be used to re-try whatever request was
 
541
        # redirected transport will be used to re-try whatever request was
542
542
        # redirected, we end up with the same url
543
543
        base_path = parsed_url.path[:-len(relpath)]
544
544
        if parsed_url.scheme in ('http', 'https'):