From eba52d2dca5fb61aca7941204d105f028ee53ba7 Mon Sep 17 00:00:00 2001 From: maxb Date: Thu, 8 Jul 2004 19:39:04 +0000 Subject: [PATCH] Fix bug causing cvs2svn to claim "svnadmin load" failed even if it succeeded. Also, show the exit status of failing commands. * cvs2svn.py (DumpfileDelegate._add_or_change_path): Display exit status of rcs co in error message. (RepositoryDelegate.finish): Display exit status of svnadmin load in error message. Change success test to boolean truth, not identity with None - thereby fixing the breakage of r1245. git-svn-id: http://cvs2svn.tigris.org/svn/cvs2svn/trunk@1248 be7e6eca-30d4-0310-a8e5-ac0d63af7087 --- cvs2svn.py | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/cvs2svn.py b/cvs2svn.py index 1d73ca82..13947ec1 100755 --- a/cvs2svn.py +++ b/cvs2svn.py @@ -3275,9 +3275,11 @@ class DumpfileDelegate(SVNRepositoryMirrorDelegate): buf = pipe.fromchild.read(PIPE_READ_SIZE) pipe.fromchild.close() error_output = pipe.childerr.read() - if pipe.wait(): - sys.exit("%s: The command '%s' failed with the following output:\n" - "%s" % (error_prefix, pipe_cmd, error_output)) + exit_status = pipe.wait() + if exit_status: + sys.exit("%s: The command '%s' failed with exit status: %s\n" + "and the following output:\n" + "%s" % (error_prefix, pipe_cmd, exit_status, error_output)) # Go back to patch up the length and checksum headers: self.dumpfile.seek(pos, 0) @@ -3394,9 +3396,11 @@ class RepositoryDelegate(DumpfileDelegate): self.dumpfile.close() self.loader_pipe.tochild.close() error_output = self.loader_pipe.childerr.read() - if self.loader_pipe.wait() is not None: - sys.exit('%s: svnadmin load failed with the following output:\n' - '%s' % (error_prefix, error_output)) + exit_status = self.loader_pipe.wait() + if exit_status: + sys.exit('%s: svnadmin load failed with exit status: %s\n' + 'and the following output:\n' + '%s' % (error_prefix, exit_status, error_output)) class StdoutDelegate(SVNRepositoryMirrorDelegate): -- 2.11.4.GIT