##// 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 prefix = tidyprefix(dest, kind, prefix)
234 prefix = tidyprefix(dest, kind, prefix)
235
235
236 def write(name, mode, islink, getdata):
236 def write(name, mode, islink, getdata):
237 if matchfn and not matchfn(name):
238 return
239 data = getdata()
237 data = getdata()
240 if decode:
238 if decode:
241 data = repo.wwritedata(name, data)
239 data = repo.wwritedata(name, data)
@@ -265,11 +263,18 b' def archive(repo, dest, node, kind, deco'
265
263
266 return base + tags
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 repo.ui.progress(_('archiving'), 0, unit=_('files'), total=total)
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 ff = ctx.flags(f)
278 ff = ctx.flags(f)
274 write(f, 'x' in ff and 0755 or 0644, 'l' in ff, ctx[f].data)
279 write(f, 'x' in ff and 0755 or 0644, 'l' in ff, ctx[f].data)
275 repo.ui.progress(_('archiving'), i + 1, item=f,
280 repo.ui.progress(_('archiving'), i + 1, item=f,
@@ -102,7 +102,10 b' invalid arch type should give 404'
102 test/baz/bletch
102 test/baz/bletch
103 test/foo
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 $ bunzip2 -dc test.tar.bz2 | tar tf - 2>/dev/null
109 $ bunzip2 -dc test.tar.bz2 | tar tf - 2>/dev/null
107 test/.hg_archival.txt
110 test/.hg_archival.txt
108 test/bar
111 test/bar
General Comments 0
You need to be logged in to leave comments. Login now