Revision: 76463
http://sourceforge.net/p/brlcad/code/76463
Author: starseeker
Date: 2020-07-24 12:48:52 +0000 (Fri, 24 Jul 2020)
Log Message:
-----------
Need better check for original-oid information
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 12:22:54 UTC (rev
76462)
+++ brlcad/trunk/misc/repowork/commit.cpp 2020-07-24 12:48:52 UTC (rev
76463)
@@ -168,6 +168,7 @@
std::getline(infile, line);
line.erase(0, 13); // Remove "original-oid " prefix
cd->id.sha1 = line;
+ cd->s->have_sha1s = true;
return 0;
}
Modified: brlcad/trunk/misc/repowork/repowork.cpp
===================================================================
--- brlcad/trunk/misc/repowork/repowork.cpp 2020-07-24 12:22:54 UTC (rev
76462)
+++ brlcad/trunk/misc/repowork/repowork.cpp 2020-07-24 12:48:52 UTC (rev
76463)
@@ -58,11 +58,16 @@
continue;
}
- if (!s->commits[i].id.sha1.length()) {
+ if (!s->have_sha1s) {
std::cerr << "Fatal - notes unpacking requested, but don't have
original sha1 ids - redo fast-export with the --show-original-ids option.\n";
exit(1);
}
+ if (!s->commits[i].id.sha1.length()) {
+ std::cerr << "Warning - commit " << s->commits[i].id.mark << " has
no sha1 info, skipping notes lookup\n";
+ continue;
+ }
+
// This is cheap and clunky, but I've not yet found a document
// describing how to reliably unpack git notes...
std::string git_notes_cmd = std::string("cd ") + repo_path +
std::string(" && git log -1 ") + s->commits[i].id.sha1 + std::string("
--pretty=format:\"%N\" > ../sha1.txt && cd ..");
Modified: brlcad/trunk/misc/repowork/repowork.h
===================================================================
--- brlcad/trunk/misc/repowork/repowork.h 2020-07-24 12:22:54 UTC (rev
76462)
+++ brlcad/trunk/misc/repowork/repowork.h 2020-07-24 12:48:52 UTC (rev
76463)
@@ -127,6 +127,7 @@
class git_fi_data {
public:
+ bool have_sha1s = false;
bool write_notes = true;
int wrap_width = 72;
bool wrap_commit_lines = false;
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