##// END OF EJS Templates
merge with stable
Thomas Arendsen Hein -
r16920:4dd03697 merge default
parent child Browse files
Show More
@@ -234,8 +234,6 b' def archive(repo, dest, node, kind, deco'
234 234 prefix = tidyprefix(dest, kind, prefix)
235 235
236 236 def write(name, mode, islink, getdata):
237 if matchfn and not matchfn(name):
238 return
239 237 data = getdata()
240 238 if decode:
241 239 data = repo.wwritedata(name, data)
@@ -265,11 +263,18 b' def archive(repo, dest, node, kind, deco'
265 263
266 264 return base + tags
267 265
268 write('.hg_archival.txt', 0644, False, metadata)
266 name = '.hg_archival.txt'
267 if not matchfn or matchfn(name):
268 write(name, 0644, False, metadata)
269 269
270 total = len(ctx.manifest())
270 if matchfn:
271 files = [f for f in ctx.manifest().keys() if matchfn(f)]
272 else:
273 files = ctx.manifest().keys()
274 files.sort()
275 total = len(files)
271 276 repo.ui.progress(_('archiving'), 0, unit=_('files'), total=total)
272 for i, f in enumerate(ctx):
277 for i, f in enumerate(files):
273 278 ff = ctx.flags(f)
274 279 write(f, 'x' in ff and 0755 or 0644, 'l' in ff, ctx[f].data)
275 280 repo.ui.progress(_('archiving'), i + 1, item=f,
@@ -102,7 +102,10 b' invalid arch type should give 404'
102 102 test/baz/bletch
103 103 test/foo
104 104
105 $ hg archive -t tbz2 -X baz test.tar.bz2
105 $ hg archive --debug -t tbz2 -X baz test.tar.bz2
106 archiving: 0/2 files (0.00%)
107 archiving: bar 1/2 files (50.00%)
108 archiving: foo 2/2 files (100.00%)
106 109 $ bunzip2 -dc test.tar.bz2 | tar tf - 2>/dev/null
107 110 test/.hg_archival.txt
108 111 test/bar
General Comments 0
You need to be logged in to leave comments. Login now