From c1ae3088b783fc62faf7ee05279b31b8a37b568e Mon Sep 17 00:00:00 2001 From: Raja R Harinath Date: Thu, 1 Jul 2010 08:25:49 +0530 Subject: Exit with EXIT_FAILURE if svn.exportRevision() failed --- src/main.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/main.cpp b/src/main.cpp index a00c6dc..c328ef1 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -131,15 +131,19 @@ int main(int argc, char **argv) if (max_rev < 1) max_rev = svn.youngestRevision(); - for (int i = min_rev; i <= max_rev; ++i) - if (!svn.exportRevision(i)) + + bool errors = false; + for (int i = min_rev; i <= max_rev; ++i) { + if (!svn.exportRevision(i)) { + errors = true; break; + } + } foreach (Repository *repo, repositories) { repo->finalizeTags(); delete repo; } - // success - return 0; + return errors ? EXIT_FAILURE : EXIT_SUCCESS; } -- cgit v1.2.1