gzip: rename the argument to `mtime` to match upstream python
Python gained the feature we missed in 3.1. The argument name is `mtime`. We
align our version for consistency.
--- a/mercurial/archival.py Tue Mar 10 16:49:38 2020 +0100
+++ b/mercurial/archival.py Tue Mar 10 18:57:49 2020 +0100
@@ -138,8 +138,8 @@
class GzipFileWithTime(gzip.GzipFile):
def __init__(self, *args, **kw):
timestamp = None
- if 'timestamp' in kw:
- timestamp = kw.pop('timestamp')
+ if 'mtime' in kw:
+ timestamp = kw.pop('mtime')
if timestamp is None:
self.timestamp = time.time()
else:
@@ -178,7 +178,7 @@
pycompat.sysstr(mode + b'b'),
zlib.Z_BEST_COMPRESSION,
fileobj,
- timestamp=mtime,
+ mtime=mtime,
)
self.fileobj = gzfileobj
return tarfile.TarFile.taropen( # pytype: disable=attribute-error