Mercurial > hg-stable
comparison mercurial/archival.py @ 6183:0750e4ba9d3d
Add config option to disable putting .hg_archival.txt inside archives.
author | Thomas Arendsen Hein <thomas@intevation.de> |
---|---|
date | Thu, 28 Feb 2008 22:39:59 +0100 |
parents | 20b05618b3e2 |
children | f89fd07fc51d |
comparison
equal
deleted
inserted
replaced
6182:07f2236c4dee | 6183:0750e4ba9d3d |
---|---|
212 raise util.Abort(_("unknown archive type '%s'" % kind)) | 212 raise util.Abort(_("unknown archive type '%s'" % kind)) |
213 archiver = archivers[kind](dest, prefix, mtime or ctx.date()[0]) | 213 archiver = archivers[kind](dest, prefix, mtime or ctx.date()[0]) |
214 m = ctx.manifest() | 214 m = ctx.manifest() |
215 items = m.items() | 215 items = m.items() |
216 items.sort() | 216 items.sort() |
217 write('.hg_archival.txt', 0644, False, | 217 if repo.ui.configbool("ui", "archivemeta", True): |
218 lambda: 'repo: %s\nnode: %s\n' % (hex(repo.changelog.node(0)), hex(node))) | 218 write('.hg_archival.txt', 0644, False, |
219 lambda: 'repo: %s\nnode: %s\n' % ( | |
220 hex(repo.changelog.node(0)), hex(node))) | |
219 for filename, filenode in items: | 221 for filename, filenode in items: |
220 write(filename, m.execf(filename) and 0755 or 0644, m.linkf(filename), | 222 write(filename, m.execf(filename) and 0755 or 0644, m.linkf(filename), |
221 lambda: repo.file(filename).read(filenode)) | 223 lambda: repo.file(filename).read(filenode)) |
222 archiver.done() | 224 archiver.done() |