--- a/mercurial/archival.py Thu Jun 26 14:35:50 2008 -0500
+++ b/mercurial/archival.py Thu Jun 26 14:35:50 2008 -0500
@@ -208,18 +208,17 @@
data = repo.wwritedata(name, data)
archiver.addfile(name, mode, islink, data)
- ctx = repo[node]
if kind not in archivers:
raise util.Abort(_("unknown archive type '%s'" % kind))
+
+ ctx = repo[node]
archiver = archivers[kind](dest, prefix, mtime or ctx.date()[0])
- m = ctx.manifest()
- items = m.items()
- items.sort()
+
if repo.ui.configbool("ui", "archivemeta", True):
write('.hg_archival.txt', 0644, False,
lambda: 'repo: %s\nnode: %s\n' % (
hex(repo.changelog.node(0)), hex(node)))
- for filename, filenode in items:
- write(filename, m.execf(filename) and 0755 or 0644, m.linkf(filename),
- lambda: repo.file(filename).read(filenode))
+ for f in ctx:
+ ff = ctx.flags(f)
+ write(f, 'x' in ff and 0755 or 0644, 'l' in ff, ctx[f].data)
archiver.done()