#include "support/lstrings.h"
#include "support/Path.h"
#include "support/Systemcall.h"
-
-#include <boost/regex.hpp>
+#include "support/regex.h"
#include <fstream>
using namespace std;
using namespace lyx::support;
-using boost::regex;
-using boost::regex_match;
-using boost::smatch;
+
namespace lyx {
if (isStrInt(rev)) {
int back = convert<int>(rev);
- if (back > 0)
- return false;
+ // if positive use as the last number in the whole revision string
+ if (back > 0) {
+ string base;
+ rsplit(version_, base , '.' );
+ rev = base + "." + rev;
+ }
if (back == 0)
rev = version_;
// we care about the last number from revision string
}
}
- FileName tmpf = FileName::tempName("lyxvcrev");
+ FileName tmpf = FileName::tempName("lyxvcrev_" + rev + "_");
if (tmpf.empty()) {
LYXERR(Debug::LYXVC, "Could not generate logfile " << tmpf);
return N_("Error: Could not generate logfile.");
return false;
}
- FileName tmpf = FileName::tempName("lyxvcrev");
+ string revname = convert<string>(rev);
+ FileName tmpf = FileName::tempName("lyxvcrev_" + revname + "_");
if (tmpf.empty()) {
LYXERR(Debug::LYXVC, "Could not generate logfile " << tmpf);
return N_("Error: Could not generate logfile.");
}
- doVCCommand("svn cat -r " + convert<string>(rev) + " "
+ doVCCommand("svn cat -r " + revname + " "
+ quoteName(onlyFileName(owner_->absFileName()))
+ " > " + quoteName(tmpf.toFilesystemEncoding()),
FileName(owner_->filePath()));