diff -r 6e2ab601be3f -r 133d13e44544 mercurial/archival.py --- a/mercurial/archival.py Sun Sep 09 12:43:24 2012 -0400 +++ b/mercurial/archival.py Tue Sep 18 19:46:15 2012 +0900 @@ -12,6 +12,7 @@ import scmutil, util, encoding import cStringIO, os, tarfile, time, zipfile import zlib, gzip +import struct def tidyprefix(dest, kind, prefix): '''choose prefix to use for names in archive. make sure prefix is @@ -165,6 +166,7 @@ if mtime < epoch: mtime = epoch + self.mtime = mtime self.date_time = time.gmtime(mtime)[:6] def addfile(self, name, mode, islink, data): @@ -178,6 +180,14 @@ mode = 0777 ftype = 0xa000 # UNX_IFLNK in unzip source code i.external_attr = (mode | ftype) << 16L + # add "extended-timestamp" extra block, because zip archives + # without this will be extracted with unexpected timestamp, + # if TZ is not configured as GMT + i.extra += struct.pack('