mercurial/archival.py
changeset 4005 656e06eebda7
parent 3968 033082ba1d1a
child 4368 6af107c742bf
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()