# HG changeset patch # User Thomas Arendsen Hein # Date 1149097261 -7200 # Node ID 0c0bfea3f72affb03bb3ad00231e28dfb3cec2c5 # Parent 61909dfb316da52e0069e8cf92cfc81cffc21523 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. diff --git a/mercurial/archival.py b/mercurial/archival.py --- a/mercurial/archival.py +++ b/mercurial/archival.py @@ -156,7 +156,7 @@ def archive(repo, dest, node, kind, deco if matchfn and not matchfn(name): return if decode: fp = cStringIO.StringIO() - repo.wwrite(None, data, fp) + repo.wwrite(name, data, fp) data = fp.getvalue() archiver.addfile(name, mode, data)