~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/urlutils.py

  • Committer: Andrew Bennetts
  • Date: 2009-07-16 07:10:45 UTC
  • mto: This revision was merged to the branch mainline in revision 4542.
  • Revision ID: andrew.bennetts@canonical.com-20090716071045-xdve2is0ydw65gu0
Improve error message in osutils.file_relpath.

Show diffs side-by-side

added added

removed removed

Lines of Context:
75
75
    This assumes that both paths are already fully specified file:// URLs.
76
76
    """
77
77
    if len(base) < MIN_ABS_FILEURL_LENGTH:
78
 
        raise ValueError('Length of base must be equal or'
 
78
        raise ValueError('Length of base (%r) must equal or'
79
79
            ' exceed the platform minimum url length (which is %d)' %
80
 
            MIN_ABS_FILEURL_LENGTH)
 
80
            (base, MIN_ABS_FILEURL_LENGTH))
81
81
    base = local_path_from_url(base)
82
82
    path = local_path_from_url(path)
83
83
    return escape(osutils.relpath(base, path))