Revision: 73027
http://sourceforge.net/p/brlcad/code/73027
Author: starseeker
Date: 2019-05-08 22:56:59 +0000 (Wed, 08 May 2019)
Log Message:
-----------
Tags (even annotated ones) in git just point to a commit sha1, so we can't add
a note to the tag itself.
Modified Paths:
--------------
brlcad/trunk/misc/repoconv/svnfexport/svnfexport_git.cxx
Modified: brlcad/trunk/misc/repoconv/svnfexport/svnfexport_git.cxx
===================================================================
--- brlcad/trunk/misc/repoconv/svnfexport/svnfexport_git.cxx 2019-05-08
20:19:39 UTC (rev 73026)
+++ brlcad/trunk/misc/repoconv/svnfexport/svnfexport_git.cxx 2019-05-08
22:56:59 UTC (rev 73027)
@@ -298,7 +298,7 @@
}
-std::string note_svn_rev(struct svn_revision &rev, std::string &rbranch, int
is_tag)
+std::string note_svn_rev(struct svn_revision &rev, std::string &rbranch)
{
std::string fi_file = std::to_string(rev.revision_number) +
std::string("-note.fi");
std::ofstream outfile(fi_file.c_str(), std::ios::out | std::ios::binary);
@@ -333,12 +333,7 @@
std::string nsha1 = line.substr(0, spos);
outfile << "from " << nsha1 << "\n";
- if (!is_tag) {
- outfile << "N :1 " << rgsha1(rbranch, rev.revision_number) << "\n";
- } else {
- std::cerr << "TODO - handle note on tag\n";
- exit(1);
- }
+ outfile << "N :1 " << rgsha1(rbranch, rev.revision_number) << "\n";
outfile.close();
return fi_file;
@@ -476,7 +471,7 @@
// Generate the note file
- nfi_file = note_svn_rev(rev, rbranch, 0);
+ nfi_file = note_svn_rev(rev, rbranch);
apply_fi_file_working(nfi_file);
}
@@ -499,11 +494,6 @@
// Apply the tag
apply_fi_file_working(wtag_fi_file);
-
- // Generate the note file
- std::string nfi_file = note_svn_rev(rev, rbranch, 1);
- apply_fi_file_working(nfi_file);
-
}
// If we got this far, we're good to go - apply all files to the primary
repo
@@ -523,8 +513,10 @@
apply_fi_file(wtag_fi_file);
remove(wtag_fi_file.c_str());
}
- apply_fi_file(nfi_file);
- remove(nfi_file.c_str());
+ if (nfi_file.length()) {
+ apply_fi_file(nfi_file);
+ remove(nfi_file.c_str());
+ }
if (wtfi_file.length()) {
apply_fi_file(wtfi_file);
remove(wtfi_file.c_str());
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