Revision: 73195
http://sourceforge.net/p/brlcad/code/73195
Author: starseeker
Date: 2019-05-27 18:27:57 +0000 (Mon, 27 May 2019)
Log Message:
-----------
Don't blow away a pre-existing 'done' directory if we need to restart - we may
want to use information from those fi files.
Modified Paths:
--------------
brlcad/trunk/misc/repoconv/svnfexport/common_structs.h
brlcad/trunk/misc/repoconv/svnfexport/svnfexport.cxx
brlcad/trunk/misc/repoconv/svnfexport/svnfexport_git.cxx
Modified: brlcad/trunk/misc/repoconv/svnfexport/common_structs.h
===================================================================
--- brlcad/trunk/misc/repoconv/svnfexport/common_structs.h 2019-05-27
18:10:56 UTC (rev 73194)
+++ brlcad/trunk/misc/repoconv/svnfexport/common_structs.h 2019-05-27
18:27:57 UTC (rev 73195)
@@ -12,6 +12,13 @@
#include "sha1.hpp"
#include "svn_date.h"
+bool
+file_exists(std::string fname)
+{
+ struct stat buffer;
+ return !stat(fname.c_str(), &buffer);
+}
+
long int starting_rev;
enum svn_node_kind_t { nkerr, nfile, ndir };
Modified: brlcad/trunk/misc/repoconv/svnfexport/svnfexport.cxx
===================================================================
--- brlcad/trunk/misc/repoconv/svnfexport/svnfexport.cxx 2019-05-27
18:10:56 UTC (rev 73194)
+++ brlcad/trunk/misc/repoconv/svnfexport/svnfexport.cxx 2019-05-27
18:27:57 UTC (rev 73195)
@@ -133,10 +133,12 @@
}
// This process will create a lot of fi files - stash them
- std::string stashdir_cmd = std::string("rm -rf done && mkdir done");
- if (std::system(stashdir_cmd.c_str())) {
- std::cout << "failed to create 'done' directory!\n";
- exit(1);
+ if (!file_exists(std::string("done"))) {
+ std::string stashdir_cmd = std::string("mkdir done");
+ if (std::system(stashdir_cmd.c_str())) {
+ std::cout << "failed to create 'done' directory!\n";
+ exit(1);
+ }
}
std::ifstream infile(argv[1]);
Modified: brlcad/trunk/misc/repoconv/svnfexport/svnfexport_git.cxx
===================================================================
--- brlcad/trunk/misc/repoconv/svnfexport/svnfexport_git.cxx 2019-05-27
18:10:56 UTC (rev 73194)
+++ brlcad/trunk/misc/repoconv/svnfexport/svnfexport_git.cxx 2019-05-27
18:27:57 UTC (rev 73195)
@@ -1,12 +1,5 @@
std::vector<std::string> all_git_branches;
-bool
-file_exists(std::string fname)
-{
- struct stat buffer;
- return !stat(fname.c_str(), &buffer);
-}
-
void
load_branches_list()
{
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