git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [StGit PATCH] add option to import series directly from a tar archive

From
Karl Hasselström <kha@treskal.com>
Date
Sep 8, 2008, 21:22 UTC
Message-ID
<20080908212257.GA9924@diana.vm.bytemark.co.uk>
In-Reply-To
<48C56AD9.6040007@gmail.com>
On 2008-09-08 13:11:37 -0500, Clark Williams wrote:
> Patch series tarballs are quite common from people who use quilt
> (e.g. many of the kernel -rt series developers).
Ah.
Show 5 quoted lines
> My biggest problem (now that I can directly import them) is to see
> if I can ease StGit's patch import rules a bit, since quilt accepts
> pretty much anything as long as there's a diff in there somewhere. I
> bomb out regularly importing the -rt series using StGit, because
> some people don't put complete email addresses in their patches.
Yes, that would be a welcome addition.
> As to the test, I'll get right on that...:)
Swell!
Show 9 quoted lines
> Karl Hasselström wrote:
>
> > By the way, is the separator always '/' in tarfile? Or should you
> > use os.sep? (There is also os.pardir which you could use instead
> > of '..', but that might be overdoing it a little ...)
>
> I doubt there are many Windows-generated tarballs out there (except
> for the Cygwin case; I believe they use '/'), but I shouldn't be so
> Unix-centric. I'll work on cleaning it up.
Well, it's no big deal, really. Just thought I'd mention it.
> I did consider adding Zipfile support as well, but didn't get a very
> good match-up between tar functionality and zip functionality. Maybe
> later...

I had a quick look at the zipfile module, and it looks like it too could easily be wrapped in a small class like I suggested in point (1).

> I did consider pulling directly from the tarball. I'll look into it.

Just don't let my suggestions take all the fun out of contributing ... only do it my way if you really think it's better.

Show 17 quoted lines
> > On 2008-09-06 22:47:19 -0500, Clark Williams wrote:
> >
> > > +    # cleanup the tmpdir
> > > +    os.system('rm -rf %s' % tmpdir)
> >
> > Aaah! My eyes! My _eyes_!!!!!
> >
> > Seriously, though, you'd want to use something like shutil.rmtree
> > here.
>
> Man, I could not for the life of me remember which module had that
> in it. To be fair I wasn't up at work with my Python Essential
> Reference, which would have pointed me directly at it, but I would
> have thought I could have gotten there through the Python docs.
> Sigh...
>
> You can dock my StGit pay for the visit to the eye doctor :)
:-)
-- 
Karl Hasselström, kha@treskal.com
      www.treskal.com/kalle
Previous: Clark WilliamsNext: Samuel Tardieu
Message 4 of 10 in “add option to import series directly from a tar archive”
  1. add option to import series directly from a tar archiveClark Williams, Sep 7, 2008
  2. Karl HasselströmSep 8, 2008
  3. Clark WilliamsSep 8, 2008
  4. Karl HasselströmSep 8, 2008
  5. Samuel TardieuSep 12, 2008
  6. Clark WilliamsSep 12, 2008
  7. Samuel TardieuSep 12, 2008
  8. Karl HasselströmSep 12, 2008
  9. Karl HasselströmSep 12, 2008
  10. Karl HasselströmSep 12, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.