Revision: 72418
          http://sourceforge.net/p/brlcad/code/72418
Author:   starseeker
Date:     2019-02-12 01:58:42 +0000 (Tue, 12 Feb 2019)
Log Message:
-----------
right... git branches don't have commit messages.  We'll have to decide what to 
do with that, since at least a few of the branch commit messages have useful 
information in them.  Perhaps add them to an 'svn_branch_msgs.txt' file in doc?

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-12 
01:48:07 UTC (rev 72417)
+++ brlcad/trunk/misc/repoconv/svnfexport/svnfexport.cxx        2019-02-12 
01:58:42 UTC (rev 72418)
@@ -755,16 +755,6 @@
     }
 }
 
-void add_branch(struct svn_revision &rev,  std::ofstream &outfile, std::string 
&branch, std::string &bbpath) {
-    outfile << "commit " << branch << "\n";
-    outfile << "mark :" << rev.revision_number << "\n";
-    outfile << "committer " << author_map[rev.author] << " " << 
svn_time_to_git_time(rev.timestamp.c_str()) << "\n";
-    outfile << "data " << rev.commit_msg.length() << "\n";
-    outfile << rev.commit_msg << "\n";
-    outfile << "from " << branch_head_id(bbpath) << "\n";
-    branch_head_ids[branch] = std::to_string(rev.revision_number);
-}
-
 void rev_fast_export(std::ifstream &infile, std::ofstream &outfile, long int 
rev_num_min, long int rev_num_max)
 {
     std::string empty_sha1("da39a3ee5e6b4b0d3255bfef95601890afd80709");
@@ -824,13 +814,16 @@
                        if (rev.revision_number < edited_tag_minr) {
                            std::string tbstr = std::string("refs/heads/") +  
node.branch;
                            std::cout << "Adding tag branch " << tbstr << " 
from " << bbpath << ", r" << rev.revision_number <<"\n";
-                           add_branch(rev, outfile, tbstr, bbpath);
+                           std::cout << rev.commit_msg << "\n";
+                           outfile << "reset " << tbstr << "\n";
+                           outfile << "from " << branch_head_id(bbpath) << 
"\n";
+                           branch_head_ids[tbstr] = branch_head_ids[bbpath];
                            have_commit = 1;
                            continue;
                        } else {
                            if (rev.revision_number == edited_tag_maxr) {
                                // Note - in this situation, we need to both 
build a commit and do a tag.  Will probably
-                               // take some refactoring
+                               // take some refactoring.  Merge information 
will also be a factor.
                                std::cout << "[TODO] Adding final commit and 
tag " << node.branch << ", r" << rev.revision_number<< "\n";
                                have_commit = 1;
                                continue;
@@ -852,7 +845,10 @@
                    int is_tag;
                    node_path_split(node.copyfrom_path, ppath, bbpath, llpath, 
&is_tag);
                    std::cout << "Adding branch " << node.branch << " from " << 
bbpath << ", r" << rev.revision_number <<"\n";
-                   add_branch(rev, outfile, node.branch, bbpath);
+                   std::cout << rev.commit_msg << "\n";
+                   outfile << "reset " << node.branch << "\n";
+                   outfile << "from " << branch_head_id(bbpath) << "\n";
+                   branch_head_ids[node.branch] = branch_head_ids[bbpath];
                    have_commit = 1;
                    continue;
                }

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