/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

Merge from bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
75
75
    
76
76
    This assumes that both paths are already fully specified file:// URLs.
77
77
    """
78
 
    assert len(base) >= MIN_ABS_FILEURL_LENGTH, ('Length of base must be equal or'
79
 
        ' exceed the platform minimum url length (which is %d)' % 
80
 
        MIN_ABS_FILEURL_LENGTH)
81
 
 
 
78
    if len(base) < MIN_ABS_FILEURL_LENGTH:
 
79
        raise ValueError('Length of base must be equal or'
 
80
            ' exceed the platform minimum url length (which is %d)' %
 
81
            MIN_ABS_FILEURL_LENGTH)
82
82
    base = local_path_from_url(base)
83
83
    path = local_path_from_url(path)
84
84
    return escape(osutils.relpath(base, path))
574
574
    :return: A unicode string which can be safely encoded into the 
575
575
         specified encoding.
576
576
    """
577
 
    assert encoding is not None, 'you cannot specify None for the display encoding.'
 
577
    if encoding is None:
 
578
        raise ValueError('you cannot specify None for the display encoding')
578
579
    if url.startswith('file://'):
579
580
        try:
580
581
            path = local_path_from_url(url)