Revision: 76473
          http://sourceforge.net/p/brlcad/code/76473
Author:   starseeker
Date:     2020-07-24 22:02:40 +0000 (Fri, 24 Jul 2020)
Log Message:
-----------
Sean correctly noted that using 'author' for this label has implications which 
are not necessarily accurate - there are many instaces where the committer is 
applying a patch authored by someone else.  Switch to git's terminology 
'committer' (git in fact has entries for both author and committer.)

Modified Paths:
--------------
    brlcad/trunk/misc/repowork/commit.cpp
    brlcad/trunk/misc/repowork/repowork.cpp
    brlcad/trunk/misc/repowork/repowork.h

Modified: brlcad/trunk/misc/repowork/commit.cpp
===================================================================
--- brlcad/trunk/misc/repowork/commit.cpp       2020-07-24 20:15:56 UTC (rev 
76472)
+++ brlcad/trunk/misc/repowork/commit.cpp       2020-07-24 22:02:40 UTC (rev 
76473)
@@ -473,9 +473,9 @@
                nstr = wmsg;
            }
        }
-       if (c->svn_author.length()) {
-           std::string authstr = std::string("svn:author:") + c->svn_author;
-           nmsg = c->commit_msg + std::string("\n\n") + nstr + 
std::string("\n") + authstr + std::string("\n");
+       if (c->svn_committer.length()) {
+           std::string committerstr = std::string("svn:committer:") + 
c->svn_committer;
+           nmsg = c->commit_msg + std::string("\n\n") + nstr + 
std::string("\n") + committerstr + std::string("\n");
        } else {
            nmsg = c->commit_msg + std::string("\n\n") + nstr + 
std::string("\n");
        }

Modified: brlcad/trunk/misc/repowork/repowork.cpp
===================================================================
--- brlcad/trunk/misc/repowork/repowork.cpp     2020-07-24 20:15:56 UTC (rev 
76472)
+++ brlcad/trunk/misc/repowork/repowork.cpp     2020-07-24 22:02:40 UTC (rev 
76473)
@@ -156,7 +156,7 @@
 }
 
 int
-git_map_svn_authors(git_fi_data *s, std::string &svn_map)
+git_map_svn_committers(git_fi_data *s, std::string &svn_map)
 {
     // read map
     std::ifstream infile(svn_map, std::ifstream::binary);
@@ -165,8 +165,8 @@
        exit(-1);
     }
 
-    // Create mapping of ids to svn authors
-    std::map<std::string, std::string> svn_author_map;
+    // Create mapping of ids to svn committers 
+    std::map<std::string, std::string> svn_committer_map;
     std::string line;
     while (std::getline(infile, line)) {
        // Skip empty lines
@@ -181,21 +181,21 @@
        }
 
        std::string id = line.substr(0, spos);
-       std::string author = line.substr(spos+1, std::string::npos);
+       std::string committer = line.substr(spos+1, std::string::npos);
 
-       svn_author_map[id] = author;
+       svn_committer_map[id] = committer;
     }
 
-    // Iterate over the commits and assign authors.
+    // Iterate over the commits and assign committers.
     for (size_t i = 0; i < s->commits.size(); i++) {
        git_commit_data *c = &(s->commits[i]);
        if (!c->svn_id.length()) {
            continue;
        }
-       if (svn_author_map.find(c->svn_id) != svn_author_map.end()) {
-           std::string svnauth = svn_author_map[c->svn_id];
-           //std::cerr << "Found SVN commit \"" << c->svn_id << "\" with 
author \"" << svnauth << "\"\n";
-           c->svn_author = svnauth;
+       if (svn_committer_map.find(c->svn_id) != svn_committer_map.end()) {
+           std::string svncommitter = svn_committer_map[c->svn_id];
+           //std::cerr << "Found SVN commit \"" << c->svn_id << "\" with 
committer \"" << svncommitter << "\"\n";
+           c->svn_committer = svncommitter;
        }
     }
 
@@ -291,7 +291,7 @@
            ("e,email-map", "Specify replacement username+email mappings (one 
map per line, format is commit-id-1;commit-id-2)", 
cxxopts::value<std::vector<std::string>>(), "map file")
            ("n,collapse-notes", "Take any git-notes contents and append them 
to regular commit messages.", cxxopts::value<bool>(collapse_notes))
            ("r,repo", "Original git repository path (must support running git 
log)", cxxopts::value<std::vector<std::string>>(), "path to repo")
-           ("s,svn-map", "Specify svn rev -> author map (one mapping per line, 
format is commit-rev authorname)", cxxopts::value<std::vector<std::string>>(), 
"map file")
+           ("s,svn-map", "Specify svn rev -> committer map (one mapping per 
line, format is commit-rev name)", cxxopts::value<std::vector<std::string>>(), 
"map file")
            ("t,trim-whitespace", "Trim extra spaces and end-of-line characters 
from the end of commit messages", cxxopts::value<bool>(trim_whitespace))
            ("w,wrap-commit-lines", "Wrap long commit lines to 72 cols (won't 
wrap messages already having multiple non-empty lines)", 
cxxopts::value<bool>(wrap_commit_lines))
            ("width", "Column wrapping width (if enabled)", 
cxxopts::value<int>(), "N")
@@ -375,8 +375,8 @@
     }
 
     if (svn_map.length()) {
-       // Handle the svn authors
-       git_map_svn_authors(&fi_data, svn_map);
+       // Handle the svn committers
+       git_map_svn_committers(&fi_data, svn_map);
     }
 
     fi_data.wrap_width = cwidth;

Modified: brlcad/trunk/misc/repowork/repowork.h
===================================================================
--- brlcad/trunk/misc/repowork/repowork.h       2020-07-24 20:15:56 UTC (rev 
76472)
+++ brlcad/trunk/misc/repowork/repowork.h       2020-07-24 22:02:40 UTC (rev 
76473)
@@ -98,7 +98,7 @@
        // Special purpose entries for assigning an additional line
        // to the existing notes-based info to id SVN usernames
        std::string svn_id;
-       std::string svn_author;
+       std::string svn_committer;
 };
 
 class git_tag_data {

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