# # # patch "ChangeLog" # from [b019f88c92309d5cd7ba45061bffe75186eb4e2a] # to [f34b17ee11bc3e45697bedd83d8c65c7a76bd42c] # # patch "viewmtn.py" # from [c0d63918a4f6f3ea8cfa923166fdd243b55a8e46] # to [2bd5932cb88ac04b68c8297459d0ac41341ea314] # ============================================================ --- ChangeLog b019f88c92309d5cd7ba45061bffe75186eb4e2a +++ ChangeLog f34b17ee11bc3e45697bedd83d8c65c7a76bd42c @@ -1,5 +1,11 @@ 2008-01-13 Grahame Bowland + * get ViewMTN's tar export mode working with + Python 2.5's tarfile module, which requires the + "name" argument + +2008-01-13 Grahame Bowland + * merge patch from Roland McGrath, making template directory a configurable option (some servers require that it be an absolute path) ============================================================ --- viewmtn.py c0d63918a4f6f3ea8cfa923166fdd243b55a8e46 +++ viewmtn.py 2bd5932cb88ac04b68c8297459d0ac41341ea314 @@ -774,13 +774,14 @@ class RevisionTar(RevisionPage): revision = mtn.Revision(revision) if not self.exists(revision): return web.notfound() - web.header('Content-Disposition', 'attachment; filename=%s.tar' % revision) + filename = "%s.tar" % revision + web.header('Content-Disposition', 'attachment; filename=%s' % filename) web.header('Content-Type', 'application/x-tar') manifest = [stanza for stanza in ops.get_manifest_of(revision)] # for now; we might want to come up with something more interesting; # maybe the branch name (but there might be multiple branches?) basedirname = revision - tarobj = tarfile.open(mode="w", fileobj=sys.stdout) + tarobj = tarfile.open(name=filename, mode="w", fileobj=sys.stdout) dir_mode, file_mode = "0700", "0600" certs = {} for stanza in manifest: