Patchwork [2,of,3] util: move dirs() and finddirs() from scmutil to util

login
register
mail settings
Submitter Pierre-Yves David
Date April 7, 2015, 6:13 p.m.
Message ID <55241E30.3050005@ens-lyon.org>
Download mbox | patch
Permalink /patch/8542/
State Accepted
Commit 21e1ece30f8c35991d37113ec7c1b72001210ee8
Headers show

Comments

Pierre-Yves David - April 7, 2015, 6:13 p.m.
On 04/06/2015 03:48 PM, Drew Gottlieb wrote:
> # HG changeset patch
> # User Drew Gottlieb <drgott@google.com>
> # Date 1428356168 25200
> #      Mon Apr 06 14:36:08 2015 -0700
> # Node ID 3d7b11f525d9439dfdaae57bdaaf5a41ed4be5a9
> # Parent  51c4efb8fb03e7cfbbbbca87dac96aa43dc4f509
> util: move dirs() and finddirs() from scmutil to util
>
> An upcoming commit requires that match.py be able to call scmutil.dirs(), but
> when match.py imports scmutil, a dependency cycle is created. This commit
> avoids the cycle by moving dirs() and its related finddirs() function from
> scmutil to util, which match.py already depends on.\

pyflakes wish you a happy easter!


ERROR: test-check-pyflakes.t output changed

This makes me a bit worried about the test coverage of this function…

(fixed while queuing)
Martin von Zweigbergk - April 7, 2015, 7:53 p.m.
I think coverage of the dirs class is fine, but the missing import was only
used in the pure version, so running the tests in pure mode should have
caught it. Thanks for fixing!
On Apr 7, 2015 11:14, "Pierre-Yves David" <pierre-yves.david@ens-lyon.org>
wrote:

>
>
> On 04/06/2015 03:48 PM, Drew Gottlieb wrote:
>
>> # HG changeset patch
>> # User Drew Gottlieb <drgott@google.com>
>> # Date 1428356168 25200
>> #      Mon Apr 06 14:36:08 2015 -0700
>> # Node ID 3d7b11f525d9439dfdaae57bdaaf5a41ed4be5a9
>> # Parent  51c4efb8fb03e7cfbbbbca87dac96aa43dc4f509
>> util: move dirs() and finddirs() from scmutil to util
>>
>> An upcoming commit requires that match.py be able to call scmutil.dirs(),
>> but
>> when match.py imports scmutil, a dependency cycle is created. This commit
>> avoids the cycle by moving dirs() and its related finddirs() function from
>> scmutil to util, which match.py already depends on.\
>>
>
> pyflakes wish you a happy easter!
>
> --- /home/marmoute/mercurial-testing/tests/test-check-pyflakes.t
> +++ /home/marmoute/mercurial-testing/tests/test-check-pyflakes.t.err
> @@ -7,6 +7,7 @@
>
>    $ hg locate 'set:**.py or grep("^!#.*python")' 2>/dev/null \
>    > | xargs pyflakes 2>/dev/null | "$TESTDIR/filterpyflakes.py"
> +  mercurial/util.py:2249: undefined name 'util'
>    tests/filterpyflakes.py:58: undefined name 'undefinedname'
>
>
>
> ERROR: test-check-pyflakes.t output changed
>
> This makes me a bit worried about the test coverage of this function…
>
> (fixed while queuing)
>
> --
> Pierre-Yves David
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel
>

Patch

--- /home/marmoute/mercurial-testing/tests/test-check-pyflakes.t
+++ /home/marmoute/mercurial-testing/tests/test-check-pyflakes.t.err
@@ -7,6 +7,7 @@ 

    $ hg locate 'set:**.py or grep("^!#.*python")' 2>/dev/null \
    > | xargs pyflakes 2>/dev/null | "$TESTDIR/filterpyflakes.py"
+  mercurial/util.py:2249: undefined name 'util'
    tests/filterpyflakes.py:58: undefined name 'undefinedname'