Revision: 73200
          http://sourceforge.net/p/brlcad/code/73200
Author:   starseeker
Date:     2019-05-28 11:48:48 +0000 (Tue, 28 May 2019)
Log Message:
-----------
Actually run the tree rebuild script when we hit a verify fail case.

Modified Paths:
--------------
    brlcad/trunk/misc/repoconv/svnfexport/common_structs.h
    brlcad/trunk/misc/repoconv/svnfexport/svnfexport_git.cxx

Modified: brlcad/trunk/misc/repoconv/svnfexport/common_structs.h
===================================================================
--- brlcad/trunk/misc/repoconv/svnfexport/common_structs.h      2019-05-28 
00:03:49 UTC (rev 73199)
+++ brlcad/trunk/misc/repoconv/svnfexport/common_structs.h      2019-05-28 
11:48:48 UTC (rev 73200)
@@ -157,7 +157,7 @@
        if (std::system(cleanup_cmd.c_str())) {
            std::cerr << "verify cleanup failed!\n";
        }
-       return 0;
+       exit(1);
     }
     ret = std::system(svn_emptydir_rm.c_str());
     while (!ret) {
@@ -174,7 +174,7 @@
     int diff_ret = std::system(repo_diff.c_str());
     if (diff_ret) {
         std::cout << "diff test failed, r" << rev << ", branch " << branch_svn 
<< "\n";
-        exit(1);
+        return 1;
     }
 
     return 0;

Modified: brlcad/trunk/misc/repoconv/svnfexport/svnfexport_git.cxx
===================================================================
--- brlcad/trunk/misc/repoconv/svnfexport/svnfexport_git.cxx    2019-05-28 
00:03:49 UTC (rev 73199)
+++ brlcad/trunk/misc/repoconv/svnfexport/svnfexport_git.cxx    2019-05-28 
11:48:48 UTC (rev 73200)
@@ -172,12 +172,12 @@
        if (!try_recovery) {
            exit(1);
        }
-       return 0;
+       return 1;
     }
     // TODO - should check tags as well...
     if (do_verify)
-       verify_repos(rev, rbranch);
-    return 1;
+       return verify_repos(rev, rbranch);
+    return 0;
 }
 
 void apply_fi_file(std::string &fi_file) {
@@ -495,12 +495,12 @@
            }
 
            // Apply the combined contents of the commit files
-           if (!apply_fi_file_working(wfi_file, rbranch, rev.revision_number, 
0, 1, 1)) {
+           if (apply_fi_file_working(wfi_file, rbranch, rev.revision_number, 
0, 1, 1)) {
                // If the apply failed, try generating the tree portion of the
                // commit from an actual svn checkout.  At least for the later
                // commits this is the most common remedy, so see if we can
                // automate it.
-               generate_svn_tree("actual_repo_checkout_path...", 
rbranch.c_str(), rev.revision_number);
+               generate_svn_tree(repo_checkout_path.c_str(), rbranch.c_str(), 
rev.revision_number);
 
                catstr = std::string("cat");
                remove(wfi_file.c_str());
@@ -523,7 +523,7 @@
                    exit(1);
                }
 
-               if (!apply_fi_file_working(wfi_file, rbranch, 
rev.revision_number, 0, 1, 0)) {
+               if (apply_fi_file_working(wfi_file, rbranch, 
rev.revision_number, 0, 1, 0)) {
                    // If we fail again, we're done - need manual review
                    std::cerr << "Failed to apply commit with custom tree: " << 
rev.revision_number << "\n";
                    exit(1);

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.



_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to