comparison mercurial/archival.py @ 2353:0c0bfea3f72a

Pass filename to decoder for 'hg archive' (fixes issue267) Despite writing to a file descriptor, the check in the [decode] section needs a filename. localrepo.wwrite() still writes to the file descriptor.
author Thomas Arendsen Hein <thomas@intevation.de>
date Wed, 31 May 2006 19:41:01 +0200
parents 4564794b6f55
children 857591c586e0
comparison
equal deleted inserted replaced
2352:61909dfb316d 2353:0c0bfea3f72a
154 154
155 def write(name, mode, data): 155 def write(name, mode, data):
156 if matchfn and not matchfn(name): return 156 if matchfn and not matchfn(name): return
157 if decode: 157 if decode:
158 fp = cStringIO.StringIO() 158 fp = cStringIO.StringIO()
159 repo.wwrite(None, data, fp) 159 repo.wwrite(name, data, fp)
160 data = fp.getvalue() 160 data = fp.getvalue()
161 archiver.addfile(name, mode, data) 161 archiver.addfile(name, mode, data)
162 162
163 archiver = archivers[kind](dest, prefix) 163 archiver = archivers[kind](dest, prefix)
164 mn = repo.changelog.read(node)[0] 164 mn = repo.changelog.read(node)[0]