tests/test-sparse-import.t
changeset 33324 33d0859c37bd
parent 33293 c9cbf4de27ba
child 44724 5c2a4f37eace
--- a/tests/test-sparse-import.t	Thu Jul 06 16:29:31 2017 -0700
+++ b/tests/test-sparse-import.t	Thu Jul 06 14:53:08 2017 -0700
@@ -147,16 +147,11 @@
 If importing results in no new rules being added, no refresh should take place!
 
   $ cat > $TESTTMP/trap_sparse_refresh.py <<EOF
-  > from mercurial import error, extensions
+  > from mercurial import error, sparse
   > def extsetup(ui):
-  >     def abort_refresh(ui, *args):
+  >     def abort_refresh(*args, **kwargs):
   >         raise error.Abort('sparse._refresh called!')
-  >     def sparseloaded(loaded):
-  >         if not loaded:
-  >             return
-  >         sparse = extensions.find('sparse')
-  >         sparse._refresh = abort_refresh
-  >     extensions.afterloaded('sparse', sparseloaded)
+  >     sparse.refreshwdir = abort_refresh
   > EOF
   $ cat >> $HGRCPATH <<EOF
   > [extensions]