Revision: 72484
          http://sourceforge.net/p/brlcad/code/72484
Author:   starseeker
Date:     2019-02-20 19:05:08 +0000 (Wed, 20 Feb 2019)
Log Message:
-----------
Insert a check for problematic revs into the main loop - will need a bit more 
though on the commit assembly for these cases.

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

Modified: brlcad/trunk/misc/repoconv/svnfexport/svnfexport.cxx
===================================================================
--- brlcad/trunk/misc/repoconv/svnfexport/svnfexport.cxx        2019-02-20 
18:38:22 UTC (rev 72483)
+++ brlcad/trunk/misc/repoconv/svnfexport/svnfexport.cxx        2019-02-20 
19:05:08 UTC (rev 72484)
@@ -77,6 +77,7 @@
 
 std::map<std::string, std::map<long int, std::set<struct svn_node *> *>> 
path_states;
 std::map<std::string, std::map<long int, std::set<struct svn_node *> 
*>>::iterator ps_it;
+std::set<long int> rebuild_revs;
 
 
 /* Branches */
@@ -748,6 +749,7 @@
        for (d_it = dnodes.begin(); d_it != dnodes.end(); d_it++) {
            std::cout << "(r" << rev.revision_number << "): copying directory " 
<< d_it->first << " at revision " << d_it->second << "\n";
            path_states[d_it->first][d_it->second] = new std::set<struct 
svn_node *>;
+           rebuild_revs.insert(rev.revision_number);
        }
     }
 
@@ -772,7 +774,7 @@
            }
        }
     }
-#if 0
+
     for (r_it = revs.begin(); r_it != revs.end(); r_it++) {
        long int maxrev = 0;
        struct svn_revision &rev = r_it->second;
@@ -869,7 +871,6 @@
            rev.project = rev.nodes[0].project; 
        }
     }
-#endif
 }
 
 void full_sync_commit(std::ofstream &outfile, struct svn_revision &rev, 
std::string &bsrc, std::string &bdest)
@@ -957,6 +958,10 @@
 
 }
 
+void old_references_commit(std::ofstream &outfile, struct svn_revision &rev, 
std::string &rbranch)
+{
+}
+
 void standard_commit(std::ofstream &outfile, struct svn_revision &rev, 
std::string &rbranch)
 {
     if (author_map.find(rev.author) == author_map.end()) {
@@ -1171,6 +1176,13 @@
                continue;
            }
 
+           if (rebuild_revs.find(rev.revision_number) != rebuild_revs.end()) {
+               std::cout << "Revision " << rev.revision_number << " references 
non-current SVN info, needs special handling\n";
+               old_references_commit(outfile, rev, rbranch);
+               exit(1);
+               continue;
+           }
+
            if (rev.revision_number == 33147) {
                std::cout << "at 33147\n";
            }
@@ -1429,15 +1441,15 @@
        std::cerr << "No revision found - quitting\n";
        return -1;
     }
-#if 0
+
     std::ifstream infile(argv[1]);
 
     std::ofstream outfile("brlcad-svn-export.fi", std::ios::out | 
std::ios::binary);
     if (!outfile.good()) return -1;
     //rev_fast_export(infile, outfile, 29887, 30854);
-    rev_fast_export(infile, outfile, 29887, 33147);
+    rev_fast_export(infile, outfile, 29887, 33148);
     outfile.close();
-#endif
+
     return 0;
 }
 

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



_______________________________________________
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to