I'm trying to write a short script that will recover a repository. The backup script generates dump files that are gzipped.
To apply a dump I need to call this command:
svnadmin load < myfile but since myfile is a gzipped one, I need to unzip it for the command to work.
Now here comes my question, is the command on top same as
subprocess.call(['svnadmin','load', myfilecontents]) This way I will avoid the need to unzip the file, to a temporary location. or should I be using
subprocess.call(['svnadmin','load'],stdin=gzip.open(myfile))
zcat myfile | svnadmin loadis more likely to be the command you want to model withsubprocess... (orgzip -dc, if for some reason, your distro of choice doesn't providezcat)