/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

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2006-12-07 17:46:18 UTC
  • mfrom: (2167.2.2 pull-bundle)
  • Revision ID: pqm@pqm.ubuntu.com-20061207174618-7064db4cb4611ab9
Fix pulling bundles over http

Show diffs side-by-side

added added

removed removed

Lines of Context:
259
259
        if path[i] not in _url_safe_characters:
260
260
            chars = path[i].encode('utf-8')
261
261
            path[i] = ''.join(['%%%02X' % ord(c) for c in path[i].encode('utf-8')])
262
 
    return scheme + '://' + ''.join(path)
 
262
    return str(scheme + '://' + ''.join(path))
263
263
 
264
264
 
265
265
def relative_url(base, other):
446
446
_hex_display_map.update((hex,'%'+hex) for hex in _no_decode_hex)
447
447
 
448
448
# These characters should not be escaped
449
 
_url_safe_characters = set('abcdefghijklmnopqrstuvwxyz'
450
 
                        'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
451
 
                        '0123456789' '_.-/'
452
 
                        ';?:@&=+$,%#')
453
 
 
 
449
_url_safe_characters = set(
 
450
   "abcdefghijklmnopqrstuvwxyz" # Lowercase alpha
 
451
   "ABCDEFGHIJKLMNOPQRSTUVWXYZ" # Uppercase alpha
 
452
   "0123456789" # Numbers
 
453
   "_.-!~*'()"  # Unreserved characters
 
454
   "/;?:@&=+$," # Reserved characters
 
455
   "%#"         # Extra reserved characters
 
456
)
454
457
 
455
458
def unescape_for_display(url, encoding):
456
459
    """Decode what you can for a URL, so that we get a nice looking path.