[PATCH 5 of 5] py3: convert: user raw strings in all lines

Martijn Pieters mj at zopatista.com
Tue Oct 11 09:10:16 EDT 2016


On 9 October 2016 at 15:55, Mateusz Kwapich <mitrandir at fb.com> wrote:

> # HG changeset patch
> # User Mateusz Kwapich <mitrandir at fb.com>
> # Date 1476021167 25200
> #      Sun Oct 09 06:52:47 2016 -0700
> # Node ID e83253287478676052e7713390983082d04afc6c
> # Parent  09060ee32a5cd51cdcfa42b23312ca17a11fc713
> py3: convert: user raw strings in all lines
>

This makes each of these strings a sysstr (str on 2 and str on 3). Is that
the intention? If so, lets make that explicit in the commit message at the
very least.


> diff --git a/hgext/convert/subversion.py b/hgext/convert/subversion.py
> --- a/hgext/convert/subversion.py
> +++ b/hgext/convert/subversion.py
> @@ -531,8 +531,8 @@ class svn_source(converter_source):
>      def checkrevformat(self, revstr, mapname='splicemap'):
>          """ fails if revision format does not match the correct format"""
>          if not re.match(r'svn:[0-9a-f]{8,8}-[0-9a-f]{4,4}-'
> -                              '[0-9a-f]{4,4}-[0-9a-f]{4,4}-[0-9a-f]'
> -                              '{12,12}(.*)\@[0-9]+$',revstr):
> +                              r'[0-9a-f]{4,4}-[0-9a-f]{4,4}-[0-9a-f]'
> +                              r'{12,12}(.*)\@[0-9]+$',revstr):
>              raise error.Abort(_('%s entry %s is not a valid revision'
>                                 ' identifier') % (mapname, revstr))
>
> diff --git a/tests/test-check-py3-compat.t b/tests/test-check-py3-compat.t
> --- a/tests/test-check-py3-compat.t
> +++ b/tests/test-check-py3-compat.t
> @@ -15,24 +15,10 @@
>    $ hg files 'set:(**.py) - grep(pygments)' | sed 's|\\|/|g' \
>    > | xargs $PYTHON3 contrib/check-py3-compat.py \
>    > | sed 's/[0-9][0-9]*)$/*)/'
> -  hgext/convert/bzr.py: error importing: <SyntaxError> cannot mix bytes
> and nonbytes literals (subversion.py, line 533) (error at convcmd.py:*)
> -  hgext/convert/convcmd.py: error importing: <SyntaxError> cannot mix
> bytes and nonbytes literals (subversion.py, line 533) (error at
> convcmd.py:*)
> -  hgext/convert/subversion.py: error importing: <SyntaxError> cannot mix
> bytes and nonbytes literals (subversion.py, line 533) (error at
> convcmd.py:*)
> -  hgext/convert/transport.py: error importing: <SyntaxError> cannot mix
> bytes and nonbytes literals (subversion.py, line 533) (error at
> convcmd.py:*)
> +  hgext/convert/transport.py: error importing: <ImportError> No module
> named 'svn.client' (error at transport.py:*)
>    hgext/fsmonitor/pywatchman/capabilities.py: error importing:
> <SyntaxError> invalid or missing encoding declaration (error at
> __init__.py:*)
>    hgext/fsmonitor/pywatchman/pybser.py: error importing: <SyntaxError>
> invalid or missing encoding declaration (error at __init__.py:*)
>    hgext/fsmonitor/watchmanclient.py: error importing: <SyntaxError>
> invalid or missing encoding declaration (error at __init__.py:*)
> -  hgext/largefiles/basestore.py: error importing: <SyntaxError> cannot
> mix bytes and nonbytes literals (subversion.py, line 533) (error at
> convcmd.py:*)
> -  hgext/largefiles/lfcommands.py: error importing: <SyntaxError> cannot
> mix bytes and nonbytes literals (subversion.py, line 533) (error at
> convcmd.py:*)
> -  hgext/largefiles/lfutil.py: error importing: <SyntaxError> cannot mix
> bytes and nonbytes literals (subversion.py, line 533) (error at
> convcmd.py:*)
> -  hgext/largefiles/localstore.py: error importing: <SyntaxError> cannot
> mix bytes and nonbytes literals (subversion.py, line 533) (error at
> convcmd.py:*)
> -  hgext/largefiles/overrides.py: error importing: <SyntaxError> cannot
> mix bytes and nonbytes literals (subversion.py, line 533) (error at
> convcmd.py:*)
> -  hgext/largefiles/proto.py: error importing: <SyntaxError> cannot mix
> bytes and nonbytes literals (subversion.py, line 533) (error at
> convcmd.py:*)
> -  hgext/largefiles/remotestore.py: error importing: <SyntaxError> cannot
> mix bytes and nonbytes literals (subversion.py, line 533) (error at
> convcmd.py:*)
> -  hgext/largefiles/reposetup.py: error importing: <SyntaxError> cannot
> mix bytes and nonbytes literals (subversion.py, line 533) (error at
> convcmd.py:*)
> -  hgext/largefiles/storefactory.py: error importing: <SyntaxError>
> cannot mix bytes and nonbytes literals (subversion.py, line 533) (error at
> convcmd.py:*)
> -  hgext/largefiles/uisetup.py: error importing: <SyntaxError> cannot mix
> bytes and nonbytes literals (subversion.py, line 533) (error at
> convcmd.py:*)
> -  hgext/largefiles/wirestore.py: error importing: <SyntaxError> cannot
> mix bytes and nonbytes literals (subversion.py, line 533) (error at
> convcmd.py:*)
>    hgext/mq.py: error importing: <TypeError> __import__() argument 1 must
> be str, not bytes (error at extensions.py:*)
>    mercurial/scmwindows.py: error importing: <ImportError> No module named
> 'winreg' (error at scmwindows.py:*)
>    mercurial/win32.py: error importing: <ImportError> No module named
> 'msvcrt' (error at win32.py:*)
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
>



-- 
Martijn Pieters
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mercurial-scm.org/pipermail/mercurial-devel/attachments/20161011/73fa6769/attachment.html>


More information about the Mercurial-devel mailing list