/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/urlutils.py

(gz) Unquote unreserved characters including tilde in urlutils.URL methods
 (Martin Packman)

Show diffs side-by-side

added added

removed removed

Lines of Context:
750
750
        else:
751
751
            self.password = None
752
752
        self.port = port
753
 
        self.quoted_path = quoted_path
 
753
        self.quoted_path = _url_hex_escapes_re.sub(_unescape_safe_chars, quoted_path)
754
754
        self.path = urllib.unquote(self.quoted_path)
755
755
 
756
756
    def __eq__(self, other):
835
835
        """
836
836
        if not isinstance(relpath, str):
837
837
            raise errors.InvalidURL(relpath)
 
838
        relpath = _url_hex_escapes_re.sub(_unescape_safe_chars, relpath)
838
839
        if relpath.startswith('/'):
839
840
            base_parts = []
840
841
        else:
866
867
        if offset is not None:
867
868
            relative = unescape(offset).encode('utf-8')
868
869
            path = self._combine_paths(self.path, relative)
869
 
            path = urllib.quote(path)
 
870
            path = urllib.quote(path, safe="/~")
870
871
        else:
871
872
            path = self.quoted_path
872
873
        return self.__class__(self.scheme, self.quoted_user,