[PATCH] issue1832 - stacktrace converting into svn without bindings

Dirkjan Ochtman dirkjan at ochtman.nl
Tue Sep 15 11:15:22 CDT 2009


On Tue, Sep 15, 2009 at 17:43, anatoly techtonik <techtonik at gmail.com> wrote:
> # HG changeset patch
> # User anatoly techtonik <techtonik at php.net>
> # Date 1253028889 -10800
> # Node ID c895e58e9171483509cee4e81fa391edd0fdc495
> # Parent  080227f584a140b2476d42346be9e9fd1c5649fe
> fix issue1832 - stacktrace converting into svn without bindings

Thanks for working on this! I have some remarks.

Please normalize the commit message:

convert: trying to convert svn without bindings fails (issue1832)

>
> diff -r 080227f584a1 -r c895e58e9171 hgext/convert/subversion.py
> --- a/hgext/convert/subversion.py       Sun Sep 13 17:23:47 2009 +0200
> +++ b/hgext/convert/subversion.py       Tue Sep 15 18:34:49 2009 +0300
> @@ -22,6 +22,7 @@
>  from common import NoRepo, MissingTool, commit, encodeargs, decodeargs
>  from common import commandline, converter_source, converter_sink, mapfile
>
> +svn_bindings = True
>  try:
>     from svn.core import SubversionException, Pool
>     import svn
> @@ -29,14 +30,14 @@
>     import svn.core
>     import svn.ra
>     import svn.delta
> -    import transport
> -    import warnings
> -    warnings.filterwarnings('ignore',
> -            module='svn.core',
> -            category=DeprecationWarning)
> +except ImportError:
> +    svn_bindings = False
>
> -except ImportError:
> -    pass
> +import transport
> +import warnings
> +warnings.filterwarnings('ignore',
> +        module='svn.core',
> +        category=DeprecationWarning)

Adding the svn_bindings = False (please don't introduce new variables
with underscores in their names) seems unrelated to moving the imports
(and warning filter), or is there some reason for that?

Cheers,

Dirkjan



More information about the Mercurial-devel mailing list