diff options
author | Raja R Harinath <harinath@hurrynot.org> | 2010-07-01 08:25:49 +0530 |
---|---|---|
committer | Raja R Harinath <harinath@hurrynot.org> | 2010-07-01 08:25:49 +0530 |
commit | c1ae3088b783fc62faf7ee05279b31b8a37b568e (patch) | |
tree | 5fea748181c0019b981c4747bf4264588be6a9c4 | |
parent | 0c1895ae9e116b6d59cd541f06ec3d116ecff6fa (diff) | |
download | svn2git-c1ae3088b783fc62faf7ee05279b31b8a37b568e.tar svn2git-c1ae3088b783fc62faf7ee05279b31b8a37b568e.tar.gz svn2git-c1ae3088b783fc62faf7ee05279b31b8a37b568e.tar.bz2 svn2git-c1ae3088b783fc62faf7ee05279b31b8a37b568e.tar.xz svn2git-c1ae3088b783fc62faf7ee05279b31b8a37b568e.zip |
Exit with EXIT_FAILURE if svn.exportRevision() failed
-rw-r--r-- | src/main.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
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; } |