[Zope-CVS] CVS: Packages/zpkgtools/zpkgtools - cvsloader.py:1.4
Fred L. Drake, Jr.
fred at zope.com
Tue Mar 9 15:38:45 EST 2004
Update of /cvs-repository/Packages/zpkgtools/zpkgtools
In directory cvs.zope.org:/tmp/cvs-serv4486
Modified Files:
cvsloader.py
Log Message:
- elaborate a couple of comments
- minor code cleanup
=== Packages/zpkgtools/zpkgtools/cvsloader.py 1.3 => 1.4 ===
--- Packages/zpkgtools/zpkgtools/cvsloader.py:1.3 Tue Mar 9 13:53:33 2004
+++ Packages/zpkgtools/zpkgtools/cvsloader.py Tue Mar 9 15:38:44 2004
@@ -226,8 +226,10 @@
rc = self.runCvsExport(cvsroot, workdir, tag, path)
if rc:
- # some error occurred; haven't figured out what, and don't
- # really care; details went to standard error:
+ # Some error occurred: we haven't figured out what, and
+ # don't really care; details went to standard error.
+ # Assume there's nothing to be gained from the temporary
+ # directory and toss it.
shutil.rmtree(workdir)
raise CvsLoadingError(cvsurl, rc)
self.workdirs.append(workdir)
@@ -243,18 +245,17 @@
def runCvsExport(self, cvsroot, workdir, tag, path):
# cvs -f -Q -z6 -d CVSROOT export -kk -d WORKDIR -r TAG PATH
- # separated out from load() to ease testing of load()
+ # separated out from load() to ease testing the rest of load()
# XXX not sure of a good way to test this method!
wf = posixpath.basename(path)
pwd = os.getcwd()
os.chdir(workdir)
try:
- rc = os.spawnlp(os.P_WAIT, "cvs",
- "cvs", "-f", "-Q", "-z6", "-d", cvsroot,
- "export", "-kk", "-d", wf, "-r", tag, path)
+ return os.spawnlp(os.P_WAIT, "cvs",
+ "cvs", "-f", "-Q", "-z6", "-d", cvsroot,
+ "export", "-kk", "-d", wf, "-r", tag, path)
finally:
os.chdir(pwd)
- return rc
# XXX CVS does some weird things with export; not sure how much
# they mean yet. Note that there's no way to tell if the resource
More information about the Zope-CVS
mailing list