Re: [PATCH] Replace git-cvsimport with a rewrite that fixes major bugs.
- From
Antoine Pelisse <apelisse@gmail.com>
- Date
- Jan 3, 2013, 07:47 UTC
- Message-ID
- <CALWbr2xx0beca_LUHO45pGMZ4Y0jZ9-iMWq8WBO6PmW==Ysw=A@mail.gmail.com>
- In-Reply-To
- <7vmwwqyc8w.fsf@alter.siamese.dyndns.org>
> Doesn't Python come with a standard subprocess module that lets you > spawn external programs safely, similar to the way Perl's list form > open(), e.g. "open($fh, "-|", 'git', @args)", works?
You mean something like this:
p1 = subprocess.Popen([backend.command()], stdout=subprocess.PIPE) subprocess.Popen(["git", "fast-import", "--quiet"] + gitopts, cwd=outdir, stdin=p1.stdout)
Assuming gitopts is a list rather than a string. (care must be taken with backend.command() also)