--- a/mercurial/subrepo.py Tue Feb 04 14:02:20 2025 -0500
+++ b/mercurial/subrepo.py Thu Jan 30 18:22:01 2025 +0100
@@ -18,6 +18,9 @@
import xml.dom.minidom
from .i18n import _
+from .interfaces.types import (
+ MatcherT,
+)
from .node import (
bin,
hex,
@@ -367,7 +370,7 @@
"""handle the files command for this subrepo"""
return 1
- def archive(self, opener, prefix, match: matchmod.basematcher, decode=True):
+ def archive(self, opener, prefix, match: MatcherT, decode=True):
files = [f for f in self.files() if match(f)]
total = len(files)
relpath = subrelpath(self)
@@ -656,7 +659,7 @@
)
@annotatesubrepoerror
- def archive(self, opener, prefix, match: matchmod.basematcher, decode=True):
+ def archive(self, opener, prefix, match: MatcherT, decode=True):
self._get(self._state + (b'hg',))
files = [f for f in self.files() if match(f)]
rev = self._state[1]
@@ -1913,7 +1916,7 @@
else:
self.wvfs.unlink(f)
- def archive(self, opener, prefix, match: matchmod.basematcher, decode=True):
+ def archive(self, opener, prefix, match: MatcherT, decode=True):
total = 0
source, revision = self._state
if not revision: