Mercurial > hg > mercurial-crew-with-dirclash
comparison mercurial/archival.py @ 4005:656e06eebda7
replace filehandle version of wwrite with wwritedata
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Fri, 29 Dec 2006 20:04:31 -0600 |
parents | 033082ba1d1a |
children | 6af107c742bf |
comparison
equal
deleted
inserted
replaced
4004:c83c35f2f4e2 | 4005:656e06eebda7 |
---|---|
152 prefix is name of path to put before every archive member.''' | 152 prefix is name of path to put before every archive member.''' |
153 | 153 |
154 def write(name, mode, data): | 154 def write(name, mode, data): |
155 if matchfn and not matchfn(name): return | 155 if matchfn and not matchfn(name): return |
156 if decode: | 156 if decode: |
157 fp = cStringIO.StringIO() | 157 data = repo.wwritedata(name, data) |
158 repo.wwrite(name, data, fp) | |
159 data = fp.getvalue() | |
160 archiver.addfile(name, mode, data) | 158 archiver.addfile(name, mode, data) |
161 | 159 |
162 ctx = repo.changectx(node) | 160 ctx = repo.changectx(node) |
163 archiver = archivers[kind](dest, prefix, mtime or ctx.date()[0]) | 161 archiver = archivers[kind](dest, prefix, mtime or ctx.date()[0]) |
164 m = ctx.manifest() | 162 m = ctx.manifest() |