Skip to content
Snippets Groups Projects
Commit ddf66c21 authored by Manuel Jacob's avatar Manuel Jacob
Browse files

convert: add docstring on convert.subversion.geturl()

The function is unusual for a bytes-handling function in Mercurial because it
can’t handle arbitrary bytes. Therefore we should document this fact.

Pointed out by Yuya Nishihara while reviewing e3b19004087a.
parent 6597e2a7
No related branches found
No related tags found
No related merge requests found
......@@ -140,6 +140,11 @@
def geturl(path):
"""Convert path or URL to a SVN URL, encoded in UTF-8.
This can raise UnicodeDecodeError if the path or URL can't be converted to
unicode using `fsencoding`.
"""
try:
return svn.client.url_from_path(
svn.core.svn_path_canonicalize(fs2svn(path))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment