mercurial/archival.py
branchstable
changeset 44475 b7ca03dff14c
parent 44474 a23b859ad17d
child 44577 f8427841c8fc
equal deleted inserted replaced
44474:a23b859ad17d 44475:b7ca03dff14c
   133 
   133 
   134 class tarit(object):
   134 class tarit(object):
   135     '''write archive to tar file or stream.  can write uncompressed,
   135     '''write archive to tar file or stream.  can write uncompressed,
   136     or compress with gzip or bzip2.'''
   136     or compress with gzip or bzip2.'''
   137 
   137 
   138     if True:
   138     if pycompat.ispy3:
       
   139         GzipFileWithTime = gzip.GzipFile  # camelcase-required
       
   140     else:
   139 
   141 
   140         class GzipFileWithTime(gzip.GzipFile):
   142         class GzipFileWithTime(gzip.GzipFile):
   141             def __init__(self, *args, **kw):
   143             def __init__(self, *args, **kw):
   142                 timestamp = None
   144                 timestamp = None
   143                 if 'mtime' in kw:
   145                 if 'mtime' in kw: