# HG changeset patch # User Manuel Jacob # Date 1593527985 -7200 # Node ID ddf66c2181049a575b19143fa23ac45a5cfb7e1d # Parent 6597e2a73a2870328fa41e46db7ab1271077a7f5 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. diff -r 6597e2a73a28 -r ddf66c218104 hgext/convert/subversion.py --- a/hgext/convert/subversion.py Tue Jun 30 01:32:17 2020 +0200 +++ b/hgext/convert/subversion.py Tue Jun 30 16:39:45 2020 +0200 @@ -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))