[PATCH 1 of 4] revlog: use absolute_import
gregory.szorc at gmail.com
Sat Jul 18 15:07:06 CDT 2015
On Thu, Jul 16, 2015 at 10:28 AM, Matt Mackall <mpm at selenic.com> wrote:
> On Tue, 2015-07-14 at 13:51 -0700, Gregory Szorc wrote:
> > # HG changeset patch
> > # User Gregory Szorc <gregory.szorc at gmail.com>
> > # Date 1436894831 25200
> > # Tue Jul 14 10:27:11 2015 -0700
> > # Node ID 5154b8421ebd670d6155659c5811f193f5fe1555
> > # Parent 35fa7c77c754aa4d156c42abfdb61ca178468872
> > revlog: use absolute_import
> > This is needed for Python 3 compatibility. We have static analysis
> > checks in place to ensure files using absolute_import conform to the
> > style adopted by this patch.
> More weird test failures on 2.6:
> --- /home/mpm/hg-test-/tests/test-help.t
> +++ /home/mpm/hg-test-/tests/test-help.t.err
> @@ -1244,6 +1244,15 @@
> $ cd "$TESTDIR"/../doc
> $ python check-seclevel.py
> + Traceback (most recent call last):
> + File "check-seclevel.py", line 168, in <module>
> + if checkhghelps():
> + File "check-seclevel.py", line 99, in checkhghelps
> + mod = extensions.load(None, name, None)
> + File "../mercurial/extensions.py", line 86, in load
> + ui.debug('could not import hgext.%s (%s): trying %s\n'
> + AttributeError: 'NoneType' object has no attribute 'debug'
> + 
> $ cd $TESTTMP
> #if serve
> ERROR: test-help.t output changed
> --- /home/mpm/hg-test-/tests/test-extension.t
> +++ /home/mpm/hg-test-/tests/test-extension.t.err
> @@ -949,12 +949,15 @@
> $ if [ -z "$hgver" ]; then
> > echo "unable to fetch a mercurial version. Make sure __version__
> is correct";
> > fi
> + unable to fetch a mercurial version. Make sure __version__ is correct
> $ rm -f throw.pyc throw.pyo
> $ hg --config extensions.throw=throw.py throw 2>&1 | egrep '^\*\*'
> - ** unknown exception encountered, please report by visiting
> - ** http://mercurial.selenic.com/wiki/BugTracker
> - ** Python * (glob)
> - ** Mercurial Distributed SCM (*) (glob)
> + ** Unknown exception encountered with possibly-broken third-party
> extension throw
> + ** which supports versions unknown of Mercurial.
> + ** Please disable throw and try your action again.
> + ** If that fixes the bug please report it to http://example.com/bts
> + ** Python 2.6.6 (r266:84292, Jan 22 2014, 09:42:36) [GCC 4.4.7
> 20120313 (Red Hat 4.4.7-4)]
> + ** Mercurial Distributed SCM (version +0-)
> ** Extensions loaded: throw
> Patch version is ignored during compatibility check
I'm able to reproduce these on Linux with Python 2.6.9. However, the
problem goes away if `make local` is executed (both run-tests.py and
run-tests.py -l work with a local build in place). However, the failure
persists if the local install was built against Python 2.7. It certainly
appears like the local install is leaking into the test environment
somehow, at least for these tests.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Mercurial-devel