typing: add hints to `mercurial.util.mktempcopy()`
Might as well, now that the previous commit indicated what types are required.
--- a/mercurial/util.py Sat Aug 10 14:18:44 2024 -0400
+++ b/mercurial/util.py Sat Aug 10 14:22:26 2024 -0400
@@ -2432,7 +2432,12 @@
return path.split(pycompat.ossep)
-def mktempcopy(name, emptyok=False, createmode=None, enforcewritable=False):
+def mktempcopy(
+ name: bytes,
+ emptyok: bool = False,
+ createmode: Optional[int] = None,
+ enforcewritable: bool = False,
+) -> bytes:
"""Create a temporary file with the same contents from name
The permission bits are copied from the original file.