Patchwork [Bug,3815] New: test-check-code-hg.t uses extensions enabled in the local repository

login
register
mail settings
Submitter mercurial-bugs@selenic.com
Date Feb. 10, 2013, 6:53 a.m.
Message ID <bug-3815-285@http.bz.selenic.com/>
Download mbox | patch
Permalink /patch/925/
State Not Applicable, archived
Headers show

Comments

mercurial-bugs@selenic.com - Feb. 10, 2013, 6:53 a.m.
http://bz.selenic.com/show_bug.cgi?id=3815

          Priority: normal
            Bug ID: 3815
                CC: mercurial-devel@selenic.com
          Assignee: bugzilla@selenic.com
           Summary: test-check-code-hg.t uses extensions enabled in the
                    local repository
          Severity: bug
    Classification: Unclassified
                OS: Linux
          Reporter: thomas@intevation.de
          Hardware: PC
            Status: UNCONFIRMED
           Version: 2.5.1
         Component: Mercurial
           Product: Mercurial

While running tests with 2.5.1:

   $ hg manifest | xargs "$check_code" --warnings --nolineno --per-file=0
+  *** failed to import extension evolve from
~/hg/repos/mutable-history/hgext/evolve.py: [Errno 2] No such file or
directory: '$TESTTMP/hg/repos/mutable-history/hgext/evolve.py'


the repository's .hg/hgrc contains:

[phases]
publishing = false

[extensions]
rebase =
evolve = ~/hg/repos/mutable-history/hgext/evolve.py



$HOME is changed to $TESTTMP during the tests, this triggers the error.

I should probably not use ~ here, because other users (who trust my account)
might want to clone the repository and will get the same error, but the issue
here is that the test uses the settings of the local .hg/hgrc, which I think
it should not do.

All other tests run fine.

Patch

--- /home/thomas/hg/repos/tah/tests/test-check-code-hg.t
+++ /home/thomas/hg/repos/tah/tests/test-check-code-hg.t.err
@@ -5,7 +5,9 @@ 
   >     echo "skipped: not a Mercurial working dir" >&2
   >     exit 80
   > fi
+  *** failed to import extension evolve from
~/hg/repos/mutable-history/hgext/evolve.py: [Errno 2] No such file or
directory: '$TESTTMP/hg/repos/mutable-history/hgext/evolve.py'

 New errors are not allowed. Warnings are strongly discouraged.