On Tue, 30 Jun 2020 08:45:44 +0200, Manuel Jacob wrote: > # HG changeset patch > # User Manuel Jacob <m...@manueljacob.de> > # Date 1593435816 -7200 > # Mon Jun 29 15:03:36 2020 +0200 > # Branch stable > # Node ID 7bd48930ea77337213859f562e2fc0abd6734830 > # Parent 4d00ac33053273ed2b9a6431800d59df94adcfc3 > # EXP-Topic svn_encoding > convert: correctly convert paths to UTF-8 for Subversion
> @@ -117,7 +151,7 @@ > path = b'/' + util.normpath(path) > # Module URL is later compared with the repository URL returned > # by svn API, which is UTF-8. > - path = encoding.tolocal(path) > + path = fs2svn(path) > path = b'file://%s' % quote(path) > return svn.core.svn_path_canonicalize(path) It's better to document that geturl() may raise UnicodeDecodeError. > --- a/tests/test-convert-svn-encoding.t > +++ b/tests/test-convert-svn-encoding.t > @@ -163,6 +163,26 @@ > abort: http://localhost:$HGPORT/\xff: missing or unsupported repository > (esc) > [255] > > +In Subversion, paths are Unicode (encoded as UTF-8). Therefore paths that > can't > +be converted between UTF-8 and the locale encoding (which is always ASCII in > +tests) don't work. > + > + $ cp -R svn-repo $XFF I suspect this would fail on Windows depending on system locale. _______________________________________________ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel