Mercurial > hg
diff tests/test-rust-ancestor.py @ 46113:59fa3890d40a
node: import symbols explicitly
There is no point in lazy importing mercurial.node, it is used all over
the place anyway. So consistently import the used symbols directly.
Fix one file using symbols indirectly via mercurial.revlog.
Differential Revision: https://phab.mercurial-scm.org/D9480
author | Joerg Sonnenberger <joerg@bec.de> |
---|---|
date | Tue, 01 Dec 2020 21:54:46 +0100 |
parents | 8a8305f557d0 |
children | 6000f5b25c9b |
line wrap: on
line diff
--- a/tests/test-rust-ancestor.py Sun Dec 13 18:29:22 2020 -0800 +++ b/tests/test-rust-ancestor.py Tue Dec 01 21:54:46 2020 +0100 @@ -2,10 +2,8 @@ import sys import unittest -from mercurial import ( - error, - node, -) +from mercurial.node import wdirrev +from mercurial import error from mercurial.testing import revlog as revlogtesting @@ -150,7 +148,7 @@ # WdirUnsupported directly idx = self.parseindex() with self.assertRaises(error.WdirUnsupported): - list(AncestorsIterator(idx, [node.wdirrev], -1, False)) + list(AncestorsIterator(idx, [wdirrev], -1, False)) def testheadrevs(self): idx = self.parseindex()