##// END OF EJS Templates
archive: pass thru mtime for directory archives, like other archive types do...
James May -
r35203:760fef6a default
parent child Browse files
Show More
@@ -262,6 +262,7 b' class fileit(object):'
262 def __init__(self, name, mtime):
262 def __init__(self, name, mtime):
263 self.basedir = name
263 self.basedir = name
264 self.opener = vfsmod.vfs(self.basedir)
264 self.opener = vfsmod.vfs(self.basedir)
265 self.mtime = mtime
265
266
266 def addfile(self, name, mode, islink, data):
267 def addfile(self, name, mode, islink, data):
267 if islink:
268 if islink:
@@ -272,6 +273,8 b' class fileit(object):'
272 f.close()
273 f.close()
273 destfile = os.path.join(self.basedir, name)
274 destfile = os.path.join(self.basedir, name)
274 os.chmod(destfile, mode)
275 os.chmod(destfile, mode)
276 if self.mtime is not None:
277 os.utime(destfile, (self.mtime, self.mtime))
275
278
276 def done(self):
279 def done(self):
277 pass
280 pass
@@ -299,7 +302,12 b' def archive(repo, dest, node, kind, deco'
299
302
300 matchfn is function to filter names of files to write to archive.
303 matchfn is function to filter names of files to write to archive.
301
304
302 prefix is name of path to put before every archive member.'''
305 prefix is name of path to put before every archive member.
306
307 mtime is the modified time, in seconds, or None to use the changeset time.
308
309 subrepos tells whether to include subrepos.
310 '''
303
311
304 if kind == 'files':
312 if kind == 'files':
305 if prefix:
313 if prefix:
General Comments 0
You need to be logged in to leave comments. Login now