[PATCH 1/3] Add export project as mbox management command

Lukas Bulwahn lukas.bulwahn at gmail.com
Sat Jul 20 02:21:46 AEST 2019


On Fri, Jul 19, 2019 at 3:50 PM Stephen Finucane <stephen at that.guru> wrote:
>
> [re-adding the list]

Oops... my mistake; my email client confused me.

>
> On Fri, 2019-07-19 at 14:44 +0200, Lukas Bulwahn wrote:
> > On Mon, Jul 15, 2019 at 5:39 PM Stephen Finucane <stephen at that.guru> wrote:
> > > On Mon, 2019-07-15 at 16:50 +0200, Mete Polat wrote:
>
> [snip]
>
> > > > +    def add_arguments(self, parser):
> > > > +        parser.add_argument(
> > > > +            '-c', '--compress', action='store_true',
> > > > +            help='Bundle and compress projects.'
> > > > +        )
> > > > +        parser.add_argument(
> > > > +            '-l', '--level', action='store', type=int, default=9,
> > > > +            help='Set a compression level between 0 and 9 (default). 0 is no '
> > > > +                 'compression. '
> > > > +        )
> > >
> > > Do we need this knob? It seems defaulting to 9 if the '-c' flag is
> > > provided would be fine for 90% of users?
> >
> > I am wondering if we need compression at all.
> >
> > Following the UNIX philosophy (only do Make each program do one thing
> > well.), I would expect that the management command can either generate
> > files/an archive file or I can configure it to output the file/the
> > archive to standard output.
> > I can then simply compress by pipe-ing that to any other compression utility.
> >
> > Stephen, Mete, what do you think?
>
> That's a fair point but I'm not sure how we could support both dumping
> to stdout and multiple projects: how would you decide which patches
> belonged to which project? Looking at the logic here though, I do think
> we could tweak it slightly. Could we *always* generate a tarball,
> regardless of the number of projects, and optionally compress it if we
> decide to keep the '--compress' flag? I've drafted this and it looks
> good to me. I also think we might want to rename the command
> 'dumparchive' to match with 'parsearchive'. I'm happy to rework on both
> counts. Thoughts?
>
> Stephen
>
Always creating a tarball sounds good.
I am still in favor of having it print to stdout and simply pipe it in
the compression tool of your choice.

But Stephen go ahead and implement as you think that is best.

Lukas


More information about the Patchwork mailing list